On Wed, Dec 31, 2014 at 12:47 PM, Yedidyah Bar David <didi@redhat.com> wrote:
----- Original Message -----
> From: "Steve Atkinson" <satkinson@telvue.com>
> To: users@ovirt.org
> Sent: Wednesday, December 31, 2014 7:15:23 PM
> Subject: [ovirt-users] engine-iso-uploader unexpected behaviour
>
> When attempting use the engine-iso-uploader to drop ISOs in my iso storage
> domain I get the following results.
>
> Using engine-iso-uploader --iso-domain=[domain] upload [iso] does not work
> because the engine does not have access to our storage network. So it
> attempts to mount to an address that is not routable. I thought to resolve
> this by adding an interfaces to the Hosted Engine, only to find that I
> cannot modify the Engine's VM config from the GUI. I receive the error:
> Cannot add Interface. This VM is not managed by the engine. Actually, I get
> that error whenever I attempt to modify anything about the engine. Maybe
> this is expected behavior? I can't find any bestpractices regarding Hosted
> Engine administration.
>
> Alternatively, using engine-iso-uploader --nfs-server=[path] upload [iso]
> --verbose returns the following error:
>
> ERROR: local variable 'domain_type' referenced before assignment
> INFO: Use the -h option to see usage.
> DEBUG: Configuration:
> DEBUG: command: upload
> DEBUG: Traceback (most recent call last):
> DEBUG: File "/usr/bin/engine-iso-uploader", line 1440, in <module>
> DEBUG: isoup = ISOUploader(conf)
> DEBUG: File "/usr/bin/engine-iso-uploader", line 455, in __init__
> DEBUG: self.upload_to_storage_domain()
> DEBUG: File "/usr/bin/engine-iso-uploader", line 1089, in
> upload_to_storage_domain
> DEBUG: elif domain_type in ('localfs', ):
> DEBUG: UnboundLocalError: local variable 'domain_type' referenced before
> assignment

Do you run it from the engine's machine? The host? Elsewhere?
Where is the iso domain?

This sounds to me like a bug, but I didn't check the sources yet.
Please open one. Thanks.

That said, you can simply copy your iso file directly to the correct
directory inside the iso domain, which is:

/path-to-iso-domain/SOME-UUID/images/11111111-1111-1111-1111-111111111111/

Make sure it's readable to vdsm:kvm (36:36).

Best,
--
Didi

I'm running the command from the Engine itself, it seems to be the only box that has this command available. The ISO domain utilizes the same root share as the DATA and EXPORT domains which seem to work fine. The structure looks something like:

server:/nfs-share/ovirt-store/iso-store/UUIDblahblah/images/
server:/nfs-share/ovirt-store/export-store/path/path/path
server:/nfs-share/ovirt-store/data-store/UUIDblahblah/images/

Each of storage-domain was created through the Engine. Perms for each below, which persists all the way down the tree:
drwxr-xr-x.  3 vdsm kvm     4 Nov 14 19:02 data-store
drwxr-xr-x.  3 vdsm kvm     4 Nov 14 19:04 export-store
drwxr-xr-x.  3 vdsm kvm     4 Nov 14 18:18 hosted-engine
drwxr-xr-x.  3 vdsm kvm     4 Nov 14 19:04 iso-store

If I attempt to mount any of them via NFS from our management network they work just fine. (moved around, read/write operations)
Copied the ISO I needed directly to it and changed the perms/ownership by hand which seems to have worked as a short term solution.

I can see why the --iso-domain argument has issues as it is trying to use the our storage network, which isn't routable from the Engine as it only has the one network interface. Although that does seem like an oversight. Seems like this transfer should pass through the SPM and not try to directly mount the NFS share if the --iso-domain flag is used.

Thanks for the quick response.