Bug 1572297

Summary: [RFE] Satellite should be able to deploy image payloads (see anaconda's liveimg directive)
Product: Red Hat Satellite Reporter: Satellite Program <pm-sat>
Component: ProvisioningAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: urgent    
Version: UnspecifiedCC: aperotti, bkearney, bmcclain, bmidwood, cbillett, cshao, cwelton, dfediuck, egolov, fdeutsch, fgarciad, huzhao, inecas, jforeman, liliu, mmccune, qiyuan, rbarry, yaniwang, ycui, ylavi
Target Milestone: 6.4.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1186915 Environment:
Last Closed: 2018-10-16 15:30:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1585092, 1600906    
Bug Blocks: 1447254    

Comment 2 Sanket Jagtap 2018-07-12 07:11:14 UTC
Build: Satellite 6.4.0 snap11

I am unable to upload the squashfs.img to a repository

hammer repository upload-content --name "$REPO" --product "$PRODUCT" --organization "$ORG" --path /root/squashfs.img
warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundaryFZEuLKKG3UC1oGKF" due to payload
Failed to upload file 'squashfs.img' to repository. Please check the file and try again.

And also the production log is filled with binary data when we hit upload.
PFA Partial production log

Comment 4 Ivan Necas 2018-07-12 16:22:51 UTC
I was able to reproduce: The relevant error logs are actually in /var/log/messages and comming from pulp

```
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: Unhandled Exception
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920) Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920) Traceback (most recent call last):
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     return self.dispatch(request, *args, **kwargs)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     return handler(request, *args, **kwargs)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/decorators.py", line 241, in _auth_decorator
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/decorators.py", line 195, in _verify_auth
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     value = method(self, *args, **kwargs)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/pulp/server/webservices/views/content.py", line 482, in put
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     upload_manager.save_data(upload_id, offset, request.body)
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/django/http/request.py", line 269, in body
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     raise RequestDataTooBig('Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.')
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920) RequestDataTooBig: Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.
~                                                                                                                                                                                          
```

Comment 5 Ivan Necas 2018-07-13 10:51:05 UTC
After further analysis, it turns out this is not a provisioning issue (to which changes in this BZ aim for), but rather an issue with uploading content to repository. Therefore, I'm putting this BZ back to ON_QA and setting to depend on #1600906, which tracks the upload issue

Comment 6 Sanket Jagtap 2018-07-24 13:11:41 UTC
Build:Satellite 6.4.0 snap13

When rendering the template with safe rendering on I get error ,
There was an error rendering the Kickstart oVirt-RHVH template: undefined method '#params' for Host::Managed::Jail (Host::Managed)

This also blocks provisioning and you get a HTTP transient error followed by 500 error code from provisioning token url on the provisioned VM

Comment 7 Sanket Jagtap 2018-07-24 13:18:34 UTC
There is another issue, filled for the same problem.
Moving this BZ to ON_QA

Comment 8 Sanket Jagtap 2018-08-01 13:33:27 UTC
Build : Satellite 6.4.0 snap14


Was able to build and subscribe the RHVH node to satellite

Cannot upload enabled repos report, is this client registered?
Retrieving http://sat-host/pub/katello-ca-consumer-latest.noarch.rpm
Preparing...                          ########################################
Updating / installing...
katello-ca-consumer-qe-testing-rhel7.s########################################
The system has been registered with ID: 5dasa43-4a92-4e85-bbd0-55sa84789b3
The registered system name is: kay-newlan.domain
Installed Product Current Status:
Product Name: Red Hat Virtualization Host
Status:       Subscribed

Loaded plugins: enabled_repos_upload, imgbased-persist, package_upload, product-
              : id, search-disabled-repos, subscription-manager, vdsmupgrade
Resolving Dependencies
--> Running transaction check

Loaded plugins: product-id, subscription-manager
Note: Forwarding request to 'systemctl enable goferd.service'.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
Running in chroot, ignoring request.

Comment 10 errata-xmlrpc 2018-10-16 15:30:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927