search for: vdsm_id

Displaying 20 results from an estimated 22 matches for "vdsm_id".

2018 Jul 05
2
[PATCH v2] v2v: rhv plugin - find suitable host
...-- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index da309e288..931fcfaa2 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -69,14 +69,34 @@ def find_host(connection): debug("hw_id = %r" % vdsm_id) - hosts_service = connection.system_service().hosts_service() + system_service = connection.system_service() + storage_name = params['output_storage'] + data_centers = system_service.data_centers_service().list( + search='storage=%s' % storage_name, + ca...
2018 Jul 05
4
[PATCH] v2v: rhv plugin - find suitable host
...pload-plugin.py index da309e288..c72f5e181 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -67,11 +67,23 @@ def find_host(connection): debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e) return None - debug("hw_id = %r" % vdsm_id) + system_service = connection.system_service() + storage_name = params['output_storage'] + data_centers = system_service.data_centers_service().list( + search='storage=%s' % storage_name, + case_sensitive=False, + ) + if len(data_centers) == 0: +...
2018 Jul 31
1
[PATCH] v2v: -o rhv-upload: PEP8 fixes for rhv-upload-plugin.py
...index 4fad27fb8..bdc1e104a 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -86,7 +86,8 @@ def find_host(connection): hosts_service = system_service.hosts_service() hosts = hosts_service.list( - search="hw_id=%s and datacenter=%s and status=Up" % (vdsm_id, datacenter.name), + search="hw_id=%s and datacenter=%s and status=Up" + % (vdsm_id, datacenter.name), case_sensitive=True, ) if len(hosts) == 0: @@ -94,8 +95,8 @@ def find_host(connection): # - 'hw_id' equals to 'vdsm_id'...
2018 Jul 05
0
Re: [PATCH v2] v2v: rhv plugin - find suitable host
...4 deletions(-) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index da309e288..931fcfaa2 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -69,14 +69,34 @@ def find_host(connection): > > debug("hw_id = %r" % vdsm_id) > > - hosts_service = connection.system_service().hosts_service() > + system_service = connection.system_service() > + storage_name = params['output_storage'] > + data_centers = system_service.data_centers_service().list( > + search='storage=%s'...
2018 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...c72f5e181 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -67,11 +67,23 @@ def find_host(connection): > debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e) > return None > > - debug("hw_id = %r" % vdsm_id) > I would leave this as is... > + system_service = connection.system_service() > + storage_name = params['output_storage'] > + data_centers = system_service.data_centers_service().list( > + search='storage=%s' % storage_name, > + case_sen...
2018 Aug 05
3
[PATCH] v2v: rhv-plugin: Use string literal concatenation
...t commit 646a44e1b190c4a7f6a9f32c63230c619e38d251 diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index bdc1e104a..2d686c2da 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -95,8 +95,8 @@ def find_host(connection): # - 'hw_id' equals to 'vdsm_id' # - Its status is 'Up' # - Belongs to the storage domain's datacenter - debug("cannot find a running host with hw_id=%r, " + - "that belongs to datacenter '%s', " + + debug("cannot find a running host wit...
2018 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...2f5e181 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -67,11 +67,23 @@ def find_host(connection): > debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e) > return None > > - debug("hw_id = %r" % vdsm_id) > + system_service = connection.system_service() > + storage_name = params['output_storage'] > + data_centers = system_service.data_centers_service().list( > + search='storage=%s' % storage_name, > + case_sensitive=False, > + ) > +...
2018 Jun 26
2
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...;"Return the current host object or None.""" > I think we need a comment for this, something like: # If we are running on a oVirt host, it must have a hardware id # file. > + try: > + with builtin_open("/etc/vdsm/vdsm.id") as f: > + vdsm_id = f.readline().strip() > + except Exception as e: > + return None > A debug message about no hardware id file would be nice to the person looking at the logs later. Without this you will have to detect this case by not seeing the next debug line. Possible but require more effort...
2018 Jun 25
1
Re: [PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...ng for disk to become > unlocked") > > + # Get the current host. If it fails, don't worry. > + host = None > + try: > + with builtin_open("/etc/vdsm/vdsm.id") as f: > Why use builtin_open() instead of open() or io.open()? > + vdsm_id = f.readline().strip() > debug log with the host hardware id would be nice here. > + > + hosts_service = connection.system_service().hosts_service() > + hosts = hosts_service.list( > + search="hw_id=%s" % vdsm_id, > + case_sensitive...
2018 Jun 26
2
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v2 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00109.html v3: - Added/fixed all suggestions from Nir in previous review. Q: I wasn't sure if we still need the "UnsupportedError" class so I left it in. Q: Does the Unix socket always have the same name? What happens if there's more than one transfer happening? I tested this both ways, and it worked both
2018 Jun 29
0
[PATCH] v2v: rhv-upload-plugin: Improve error handling
...deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index f404bd758..8e4052048 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -63,7 +63,10 @@ def find_host(connection): with builtins.open("/etc/vdsm/vdsm.id") as f: vdsm_id = f.readline().strip() except Exception as e: + # This is most likely not an oVirt host. + debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e) return None + debug("hw_id = %r" % vdsm_id) hosts_service = connection.system_service...
2018 Jun 27
0
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...quot;"" >> > > I think we need a comment for this, something like: > > # If we are running on a oVirt host, it must have a hardware id > # file. > > >> + try: >> + with builtin_open("/etc/vdsm/vdsm.id") as f: >> + vdsm_id = f.readline().strip() >> + except Exception as e: >> + return None > > > > > A debug message about no hardware id file would be nice to the person > looking at the logs later. Without this you will have to detect this case > by not seeing the next debug l...
2018 Jun 21
0
[PATCH 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...donly): if time.time() > endt: raise RuntimeError("timed out waiting for disk to become unlocked") + # Get the current host. If it fails, don't worry. + host = None + try: + with builtin_open("/etc/vdsm/vdsm.id") as f: + vdsm_id = f.readline().strip() + + hosts_service = connection.system_service().hosts_service() + hosts = hosts_service.list( + search="hw_id=%s" % vdsm_id, + case_sensitive=False, + ) + if len(hosts) > 0: + host = hosts[0] +...
2018 Jun 26
0
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...s sdk @@ -56,6 +57,28 @@ def debug(s): print(s, file=sys.stderr) sys.stderr.flush() +def find_host(connection): + """Return the current host object or None.""" + try: + with builtin_open("/etc/vdsm/vdsm.id") as f: + vdsm_id = f.readline().strip() + except Exception as e: + return None + debug("hw_id = %r" % vdsm_id) + + hosts_service = connection.system_service().hosts_service() + hosts = hosts_service.list( + search="hw_id=%s" % vdsm_id, + case_sensitive=False, +...
2018 Jun 22
0
[PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...donly): if time.time() > endt: raise RuntimeError("timed out waiting for disk to become unlocked") + # Get the current host. If it fails, don't worry. + host = None + try: + with builtin_open("/etc/vdsm/vdsm.id") as f: + vdsm_id = f.readline().strip() + + hosts_service = connection.system_service().hosts_service() + hosts = hosts_service.list( + search="hw_id=%s" % vdsm_id, + case_sensitive=False, + ) + if len(hosts) > 0: + host = hosts[0] +...
2018 Jun 22
4
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00099.html v2: - Just fixes the two problems noted in the review of the previous version. Rich.
2018 Jun 21
6
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
These two patches add support for using a Unix domain socket to directly access imageio in the case where imageio is running on the conversion host (usually that means virt-v2v is running on the RHV node and something else -- eg. CFME scripts -- arranges that the RHV node is the same one running imageio). Conversions in the normal case are not affected - they happen over TCP as usual. This was
2018 Jul 25
1
[PATCH] v2v: rhv plugin - case-sensitive search queries
...) if len(data_centers) == 0: # The storage domain is not attached to a datacenter @@ -84,7 +84,7 @@ def find_host(connection): hosts_service = system_service.hosts_service() hosts = hosts_service.list( search="hw_id=%s and datacenter=%s and status=Up" % (vdsm_id, datacenter.name), - case_sensitive=False, + case_sensitive=True, ) if len(hosts) == 0: # This oVirt host is not registered with engine. -- 2.17.1
2018 Aug 06
0
Re: [PATCH] v2v: rhv-plugin: Use string literal concatenation
...32c63230c619e38d251 > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index bdc1e104a..2d686c2da 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -95,8 +95,8 @@ def find_host(connection): > # - 'hw_id' equals to 'vdsm_id' > # - Its status is 'Up' > # - Belongs to the storage domain's datacenter > - debug("cannot find a running host with hw_id=%r, " + > - "that belongs to datacenter '%s', " + > + debug("canno...
2018 Jun 27
1
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
On Wed, Jun 27, 2018 at 12:37:20PM +0300, Nir Soffer wrote: > I tested the patch yesterday, and unix socket did not work - silently. > > After changing the code to: > > try: > with builtin_open("/etc/vdsm/vdsm.id") as f: > vdsm_id = f.readline().strip() > except Exception as e: > debug("cannot read host hardware id: %s" % e) > return None > > Then I got this message: > > cannot read host hardware id: name 'builtin_open' is not defined > > We are paying t...