Bug 832158
Summary: | ISO List is not refreshed after new ISO is uploaded | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] oVirt | Reporter: | Adam Litke <alitke> | ||||||
Component: | ovirt-iso-uploader | Assignee: | Keith Robertson <kroberts> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 3.1 RC | CC: | aburden, acathrow, dyasny, ecohen, iheim, jmoran, kroberts, mgoldboi, mpastern, ykaul | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | 3.2 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | integration | ||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: |
Newly added ISOs were not visible in the 'Attach ISO' list unless the list was manually refreshed. A fix has been made available so that the ISO list automatically refreshes after a new ISO has been uploaded.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 836638 (view as bug list) | Environment: | |||||||
Last Closed: | 2013-02-15 06:47:07 UTC | Type: | Bug | ||||||
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: | |||||||||
Bug Blocks: | 836638 | ||||||||
Attachments: |
|
Description
Adam Litke
2012-06-14 17:21:04 UTC
please provide the syntax used to upload the image and uploader and engine logs Created attachment 591928 [details]
engine.log
Command used: engine-iso-uploader -i isos upload /scratch/isos/Fedora-17-x86_64-netinst.iso /var/log/ovirt-engine/engine-iso-uploader.log is empty. adam - was it auto refreshed after 5 minutes? keith - I'm pretty sure engine can't auto-refresh if rest credentials aren't provided? (In reply to comment #4) > adam - was it auto refreshed after 5 minutes? Unfortunately I have already recycled my test environment. I assume the expected behavior is a 5 minute refresh cycle? If so, then I can close this bug as 'working as designed' and add an RFE so that after ovirt-iso-uploader completes, it will force a refresh on the iso domain. iirc, iso uploader already supports the refresh, but you need to give it crednetials to use the REST API to do so. Couple of points: 1 - The ISO uploader shd be prompting you for a PW unless you've supplied it in isouploader.conf. Are you certain that you don't have a PW in isouploader.conf and if you do that it is the correct PW? Example: # engine-iso-uploader -i localISO upload test.vfd Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): It is prompting you for the PW so that it can force engine to refresh the ISO domain, BTW. 2 - The log file will be empty unless you supply '-v' or there is an "ERROR" log condition. By default the LC is set to "INFO" and above. Hence, unless there is an ERROR, WARN, etc. you'll not see anything in the log file. (In reply to comment #8) > Couple of points: > > 1 - The ISO uploader shd be prompting you for a PW unless you've supplied it > in isouploader.conf. Are you certain that you don't have a PW in > isouploader.conf and if you do that it is the correct PW? > Yes, it did prompt me for those credentials. Shouldn't it be able to use the password I entered to trigger the refresh? > Example: > # engine-iso-uploader -i localISO upload test.vfd > Please provide the REST API password for the admin@internal oVirt Engine > user (CTRL+D to abort): > > It is prompting you for the PW so that it can force engine to refresh the > ISO domain, BTW. Did not seem to work in my setup. > 2 - The log file will be empty unless you supply '-v' or there is an "ERROR" > log condition. By default the LC is set to "INFO" and above. Hence, unless > there is an ERROR, WARN, etc. you'll not see anything in the log file. Not sure this is completely resolved yet. (In reply to comment #10) > Not sure this is completely resolved yet. Agree. WRT to: "Yes, it did prompt me for those credentials. Shouldn't it be able to use the password I entered to trigger the refresh?" Yes, this is the reason that it is asking you for the PW. It cannot invoke the RESTful method with out proper credentials. --- I'm investigating the following: I just compared the upstream versus downstream behaviour and for some reason the ovirt-engine-sdk is returning "None" when I call self.api.storagedomains.get(ID) with a valid SDID. It could be my system or it could be the sdk. I'm not sure yet. OK, I just did some more testing and I think that the problem is in ovirt-engine-sdk. I've attached a sample program to prove the point. The program: 1) In the program, I make a connection to the API. 2) To prove the connection is active, I print the API version. 3) Next, I list all storage domains. 4) Finally, I try to get a storage domain that I know is an ISO domain. The problem: SDK returns 'None' for an existing ISO SD. This is the root cause of the problem. # python test.py API Vendor(ovirt.org) API Version(3.1.0) 8ed3a6c3-c414-4126-89ca-03339da366e8 <-- This is an ISO domain. 75ce9e4f-1f57-4cdd-a20d-ceda005dbdce Looking for SD with id(8ed3a6c3-c414-4126-89ca-03339da366e8) SD(None) Created attachment 592742 [details]
Simple program to test SD access
Thought about it on the way home. The kwargs had changed between the old API and new. Fix is here: http://gerrit.ovirt.org/5464 changing status to POST. MODIFIED is after it is merged. (In reply to comment #12) > OK, I just did some more testing and I think that the problem is in > ovirt-engine-sdk. I've attached a sample program to prove the point. > > The program: > 1) In the program, I make a connection to the API. > 2) To prove the connection is active, I print the API version. > 3) Next, I list all storage domains. > 4) Finally, I try to get a storage domain that I know is an ISO domain. > > The problem: > SDK returns 'None' for an existing ISO SD. This is the root cause of the > problem. > > # python test.py > API Vendor(ovirt.org) API Version(3.1.0) > 8ed3a6c3-c414-4126-89ca-03339da366e8 <-- This is an ISO domain. > 75ce9e4f-1f57-4cdd-a20d-ceda005dbdce > Looking for SD with id(8ed3a6c3-c414-4126-89ca-03339da366e8) > SD(None) Hi Keith, the problem is in your code, (i see you already fixed it), you did: ------- api.storagedomains.get(id) while should: ------_------ api.storagedomains.get(id=id), NOTE ---- * basically you should always check method documentation, api.storagedomains.get().__doc__ in your case, only parameters there are: [@param name: string (the name of the entity)] [@param **kwargs: dict (property based filtering)] i.e to use kwargs, you have to specify property name (id=xxx as you did in your fix). * you can also locate ISO domain using client filtering: api.storagedomains.list(type='iso') using very same kwargs pattern. 3.2 beta built, moving to ON_QA status to allow testing |