Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Ensure upload of images actually succeeds #150

Open
mkesper opened this issue Jan 9, 2019 · 1 comment
Open

Ensure upload of images actually succeeds #150

mkesper opened this issue Jan 9, 2019 · 1 comment
Labels

Comments

@mkesper
Copy link

mkesper commented Jan 9, 2019

Whether the upload is using curl as right now or the method proposed in #119, it should always check that there were no errors.
Right now, the result of the curl command isn't checked at all:
OvfManager.rb:
``

    system("#{downloadCmd} | #{uploadCmd}", :out => "/dev/null")
    
    keepAliveThread.kill
    keepAliveThread.join
    
    progress += (90.0 / result.fileItem.length)
    nfcLease.HttpNfcLeaseProgress(:percent => progress.to_i)
  end

  nfcLease.HttpNfcLeaseProgress(:percent => 100)
  raise nfcLease.error if nfcLease.state == "error"

It should also raise if the system command returns an error.

@mkesper
Copy link
Author

mkesper commented Jan 9, 2019

Example:

2019-01-07 11:43:53 +0100: Uploading OVF to przlhyp711.example.com...
DEBUG: Timeout: 300
Iteration 1: Trying to get host's IP address ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0  740M    0 1100k    0     0  1051k      0  0:12:00  0:00:01  0:11:59 1051k
  0  740M    0 5900k    0     0  3243k      0  0:03:53  0:00:01  0:03:52 6209k
  1  740M    1 10.1M    0     0  3757k      0  0:03:21  0:00:02  0:03:19 5400k
  2  740M    2 18.5M    0     0  5035k      0  0:02:30  0:00:03  0:02:27 6563k
  3  740M    3 27.4M    0     0  5409k      0  0:02:20  0:00:05  0:02:15 6507k
…
75  740M   75  560M    0     0  2723k      0  0:04:38  0:03:30  0:01:08  560k
76  740M   76  564M    0     0  2730k      0  0:04:37  0:03:31  0:01:06  710kcurl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

76  740M   76  565M    0     0  2464k      0  0:05:07  0:03:55  0:01:12  300k
curl: (23) Failed writing body (4096 != 16384)
Iteration 1: Trying to access nfcLease.info.entity ...
HttpNfcLeaseComplete succeeded
Uploading template sles12sp3_1.0.2018-12-10_10g into phvvvcs005.example.com-SK1/T002-RZ-WSI done successfully

@jrgarcia jrgarcia self-assigned this Jan 9, 2019
@jrgarcia jrgarcia added the bug label Jan 9, 2019
@jrgarcia jrgarcia removed their assignment Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants