Re: [ovirt-users] [Python SDK] Setup Host network with IP address
Sorry, I made a stupid mistake. I given wrong IP itself ... it need to be 30 rather than 300. Please ignore mail. On Fri, Mar 24, 2017 at 10:12 AM, TranceWorldLogic . < tranceworldlo...@gmail.com> wrote: > Hi, > > I am trying to setup network via python sdk as shown below: > > myhost_service.setup_networks( modified_network_attachments = [ > types.NetworkAttachment( > host = myhost, > host_nic = > types.HostNic(name="eth0"), > network = > types.Network(name="Hello"), > ip_address_assignments = [ > types.IpAddressAssignment( > assignment_method = > types.BootProtocol.STATIC, > ip = types.Ip( > > address="192.168.300.10", > > netmask="255.255.255.0", > > version=types.IpVersion.V4, > ), > ) > ], > ), >] ) > > > But I am getting below error: > "ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is > "[Bad format of IPv4 address]". HTTP response code is 400." > > Please help me. > Ovirt release version = 4.0 > > Thanks, > ~Rohit > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] [Python SDK] Setup Host network with IP address
Hi, I am trying to setup network via python sdk as shown below: myhost_service.setup_networks( modified_network_attachments = [ types.NetworkAttachment( host = myhost, host_nic = types.HostNic(name="eth0"), network = types.Network(name="Hello"), ip_address_assignments = [ types.IpAddressAssignment( assignment_method = types.BootProtocol.STATIC, ip = types.Ip( address="192.168.300.10", netmask="255.255.255.0", version=types.IpVersion.V4, ), ) ], ), ] ) But I am getting below error: "ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Bad format of IPv4 address]". HTTP response code is 400." Please help me. Ovirt release version = 4.0 Thanks, ~Rohit ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] ovirt Node Building
Hello, I have recently build ovirt-engine from source using this link( http://www.ovirt.org/develop/developer-guide/engine/engine-development-environment/). Now I want to build ovirt node using this( http://www.ovirt.org/develop/projects/node/building/). I am confused that can I build that node on the same system as of ovirt-engine or I need to do these steps on any other system. Thanks, Shubham ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] Setting up hosted engine appliance on a bonded interface
Hi, I am attempting to deploy an appliance to a bonded interface, and i getting this error when it attempts to setup the bridge: [ ERROR ] Failed to execute stage 'Misc configuration': Failed to setup networks {'ovirtmgmt': {'bonding': 'bond0', 'ipaddr': u'10.20.101.181', 'netmask': u'255.255.255.0', 'defaultRoute': True, 'gateway': u'10.20.101.1'}}. Error code: "-32603" message: "Attempt to call function: > with arguments: ({u'ovirtmgmt': {u'bonding': u'bond0', u'ipaddr': u'10.20.101.181', u'netmask': u'255.255.255.0', u'defaultRoute': True, u'gateway': u'10.20.101.1'}}, {}, {u'connectivityCheck': False}) error: 'NoneType' object is not iterable" Is it possible to deploy an appliance to a network bond? My Network guy has configured my ports in the switch so i can connect via bonded links. however, if the interfaces are not bonded, it will suspend the links.___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] Answer file key for "nonlocal postgres"
Hello, I’m working on an answerfile for an unattended Ovirt install. The engine and the data warehouse DBs live remotely. I think I have most of the relevant keys defined, but appear to be missing one, because the installer is attempting to manage a local Postgres. Log and error below. Keys I’ve defined so far are: OVESETUP_DB/secured=bool:False OVESETUP_DB/user=str:engine OVESETUP_DB/password=str:[SNIP] OVESETUP_DB/dumper=str:pg_custom OVESETUP_DB/database=str:ovirt_engine OVESETUP_DB/fixDbViolations=none:None OVESETUP_DB/host=str:[SNIP] OVESETUP_DB/port=int:5435 OVESETUP_DB/filter=none:None OVESETUP_DB/restoreJobs=int:2 OVESETUP_DB/securedHostValidation=bool:False And a similar set for the DWH. Anyone know what I am missing? Thanks in advance, -j - - - - The user error is: [ INFO ] Creating PostgreSQL 'ovirt_engine' database [ ERROR ] Failed to execute stage 'Misc configuration': Failed to start service 'postgresql' [ INFO ] Yum Performing yum transaction rollback From the installer log, it obviously still thinks it is supposed to set up PG locally: 2017-03-23 23:57:18 DEBUG otopi.context context._executeMethod:128 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._misc 2017-03-23 23:57:18 INFO otopi.ovirt_engine_setup.engine_common.postgres postgres.provision:485 Creating PostgreSQL 'ovirt_engine' database 2017-03-23 23:57:18 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/var/lib/pgsql/data/pg_hba.conf'' 2017-03-23 23:57:18 DEBUG otopi.filetransaction filetransaction.prepare:185 file '/var/lib/pgsql/data/pg_hba.conf' exists 2017-03-23 23:57:18 DEBUG otopi.filetransaction filetransaction.prepare:219 backup '/var/lib/pgsql/data/pg_hba.conf'->'/var/lib/pgsql/data/pg_hba.conf.20170323235718' 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service postgresql 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'stop', 'postgresql.service'), executable='None', cwd='None', env=None 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'stop', 'postgresql.service'), rc=0 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'stop', 'postgresql.service') stdout: 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'stop', 'postgresql.service') stderr: 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service postgresql 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'start', 'postgresql.service'), executable='None', cwd='None', env=None 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'start', 'postgresql.service'), rc=1 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'start', 'postgresql.service') stdout: 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'start', 'postgresql.service') stderr: Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details. 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'File transaction for '/var/lib/pgsql/data/pg_hba.conf'' 2017-03-23 23:57:19 DEBUG otopi.context context._executeMethod:142 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/provisioning/postgres.py", line 201, in _misc self._provisioning.provision() File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 496, in provision self.restartPG() File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 397, in restartPG state=state, File "/usr/share/otopi/plugins/otopi/services/systemd.py", line 141, in state service=name, RuntimeError: Failed to start service 'postgresql' 2017-03-23 23:57:19 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Misc configuration': Failed to start service 'postgresql' 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'Yum Transaction' 2017-03-23 23:57:19 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:80 Yum Performing yum transaction rollback Loaded plugins: fastestmirror, versionlock 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'DWH Engine database
Re: [ovirt-users] Getting error when i try to assign logical networks to interfaces
On Thu, Mar 23, 2017 at 9:25 AM, martin chamambowrote: > I havent set up any hooks and when i try to assign logical networks to an > already existing interface on the host ,it gives me this error > > Hook error: Hook Error: ('Traceback (most recent call last):\n File > "/usr/libexec/vdsm/hooks/before_network_setup/50_fcoe", line 18, in > \nfrom vdsm.netconfpersistence import > RunningConfig\nImportError: No module named netconfpersistence\n',) > vdsm-hook-fcoe is installed by default on ovirt-node. Which version of vdsm (and vdsm-hook-fcoe) are you using? This Traceback smells like a mismatch between the two. ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] strange behavior of ovirt-node ng update
I have one Ovirt Node in my test cluster(others are centos), I'm observing strange behavior of update checker in engine. In options I can see: engine=# select * from vdc_options where option_name='OvirtNodePackageNamesForCheckUpdate'; option_id | option_name |option_value| version ---+-++- 124 | OvirtNodePackageNamesForCheckUpdate | ovirt-node-ng-image-update | general (1 row) so it tries to check for updated version of ovirt-node-ng-image-update, but there is no ovirt-node-ng-image-update package installed inside updated node image, so engine always shows available updates on this node to the same version: > Check for available updates on host XXX was completed successfully with > message 'found updates for packages ovirt-node-ng-image-4.1.1-1.el7.centos, > ovirt-node-ng-image-update-4.1.1-1.el7.centos'. I saw a bug in bugzilla, that it should be fixed in 4.0 Initially engine was set up as 4.x version, after that updated between releases and finally to 4.1.0, and today to 4.1.1. I saw this behavior on 4.1.0 node and also on 4.1.1, on this page: http://www.ovirt.org/node/4.0/update/ Maybe my OvirtNodePackageNamesForCheckUpdate was changed between releases, but engine-setup left it untouched and i should change it manually? If so, what it should look like? -- ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] Upgrade from 3.6 to 4.1
I am currently running oVirt 3.6 on a physical server using hosted engine environment. I have one server since it's a lab setup. The storage is on a Synology 3615xs iSCSI LUN so that's where the vms are. I plan to upgrade to 4.1 and need to check to make sure I understand the procedure. I've read the oVirt 4.1 Release Notes and they leave some questions. First they say I can simply install the 4.1 release repo update all the ovirt-*-setup* and then run engine-setup. 1. I assume this is on the engine VM running on the host physical box. 2. What does engine-setup do. Does it know what I have and simply update or do I have to go through setup again. 3. Then do I go to the host and update all the ovirt stuff? However, they then say for oVirt Hosted Engine follow a link for upgrading which takes me to a Not Found :( page but did have a link back to the release notes which link to the Not Found which So what do I need to know about upgrading a hosted engine setup that there are no directions for. Are there some gotchas? I thought that the release notes said I just had to upgrade the engine and then the host. Given that my VMs are on iSCSI what happens if things go bad and I have to start from scratch. Can I import the VMs created under 3.6 into 4.1 or do I have to do something else like copy them somewhere for backup. Any other hints and tips are appreciated. Thanks. ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] ovirt-shell backup
On 03/23/2017 02:40 PM, Marcin Kruk wrote: > Hello is it possible to execute below actions from the ovirth-shell: > 1. Make snapshot > ( ovirt-shell -E 'add snapshot --parent-vm-name --description > ) > 2. Make clone from snaphot above > ( ? ) > 3. Export clone > ( ? ) > The ovirt-shell tools is deprecated since version 4.0 of oVirt, and will be removed in version 4.2. I suggest that you avoid using it, and consider using the Ansible modules: http://docs.ansible.com/ansible/list_of_cloud_modules.html#ovirt Or one of the SDKs: Python: https://github.com/oVirt/ovirt-engine-sdk Ruby: https://github.com/oVirt/ovirt-engine-sdk-ruby Java: https://github.com/oVirt/ovirt-engine-sdk-java In particular these SDK examples may be of interest: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/add_vm_snapshot.py https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/clone_vm_from_snapshot.py If you still want to use ovirt-shell, then it should be something like this: add snapshot --parent-vm-name myvm --description mysnap That will return the snapshot data, including the id, take note of it, and then: add vm --name mynewvm --snapshots-snapshot "snapshot.id=the_id_of_the_snapshot" --cluster-name mycluster ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] VMs changing to unknown state
I have an ovirt host running ovirt 4.0 which keeps putting the VMs running on that host into an unknown state. I checked the vdsm logs and there are several errors similar to below. Mar 20 10:16:11 ovirt-node-production3.example.com vdsm[17123]: vdsm root ERROR Unhandled exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 372, in wrapper return f(*a, **kw) File "/usr/share/vdsm/virt/migration.py", line 624, in run self.monitor_migration() File "/usr/share/vdsm/virt/migration.py", line 657, in monitor_migration job_stats = self._vm._dom.jobStats() File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 69, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 123, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 917, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1387, in jobStats if ret is None: raise libvirtError ('virDomainGetJobStats() failed', dom=self) libvirtError: Requested operation is not valid: domain is not running Restarting vdsmd resolves the issue however I would like to resolve the issue permanently. Does anybody know what would cause this? ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Getting error when i try to assign logical networks to interfaces
Planning on using ISCSI , and it seems like defining logical networks is a pre-requisite for your host to come online and that error is happening when i try to assign the ovirtmngmnt logical network to an interface On Thu, Mar 23, 2017 at 6:58 PM, Dominik Hollerwrote: > Are you using Fibre Channel over Ethernet? > > On Thu, 23 Mar 2017 09:25:04 +0200 > martin chamambo wrote: > > > I havent set up any hooks and when i try to assign logical networks > > to an already existing interface on the host ,it gives me this error > > > > Hook error: Hook Error: ('Traceback (most recent call last):\n File > > "/usr/libexec/vdsm/hooks/before_network_setup/50_fcoe", line 18, in > > \nfrom vdsm.netconfpersistence import > > RunningConfig\nImportError: No module named netconfpersistence\n',) > > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Getting error when i try to assign logical networks to interfaces
Are you using Fibre Channel over Ethernet? On Thu, 23 Mar 2017 09:25:04 +0200 martin chamambowrote: > I havent set up any hooks and when i try to assign logical networks > to an already existing interface on the host ,it gives me this error > > Hook error: Hook Error: ('Traceback (most recent call last):\n File > "/usr/libexec/vdsm/hooks/before_network_setup/50_fcoe", line 18, in > \nfrom vdsm.netconfpersistence import > RunningConfig\nImportError: No module named netconfpersistence\n',) ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Roadmap
Mmmm Interesting There is not something in general for the project like this in Trello ?: https://trello.com/b/XBd0CmFk/rh-ovirt-4-0-ui-overhaul and https://trello.com/b/lqNXh8uI/ovirt-4-1-ovn I found this article also: http://searchservervirtualization.techtarget.com/feature/Red-Hat-Summit-2016-includes-RHEV-rebranding-and-container-updates 2017-03-23 3:17 GMT-05:00 Yedidyah Bar David: > On Wed, Mar 22, 2017 at 11:38 PM, Julián Tete > wrote: > > Hi Friends of oVirt > > > > Is there any roadmap for oVirt for 2017 and 2018? > > > > Any roadmap for oVirt by versions? 4.2.X, 4.3.X, 4.4.X > > You can get a clue as to what *might* be included by searching bugzilla. > E.g. to find all bugs with target milestone currently containing ovirt-4.2: > > https://bugzilla.redhat.com/buglist.cgi?classification= > oVirt=target_milestone=bug_status_id=7207043= > substring=notequals_format=advanced=ovirt-4.2=CLOSED > > Obviously, at this point not everything is there, and some things that > are there might be postponed or closed eventually. > > > > > Thank you > > > > ___ > > Users mailing list > > Users@ovirt.org > > http://lists.ovirt.org/mailman/listinfo/users > > > > > > -- > Didi > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] NFS ISO domain from hosted-engine VM
On Mar 23, 2017, at 10:51 AM, Yedidyah Bar Davidwrote: > On Thu, Mar 23, 2017 at 4:12 PM, Devin A. Bougie > wrote: >> Hi, All. Are there any recommendations or best practices WRT whether or not >> to host an NFS ISO domain from the hosted-engine VM (running the oVirt >> Engine Appliance)? We have a hosted-engine 4.1.1 cluster up and running, >> and now just have to decide where to serve the NFS ISO domain from. > > NFS ISO domain on the engine machine is generally deprecated, and > specifically problematic for hosted-engine, see also: Thanks, Didi! I'll go ahead and setup the NFS ISO domain in a separate cluster. Sincerely, Devin > https://bugzilla.redhat.com/show_bug.cgi?id=1332813 > I recently pushed a patch to remove the question about it altogether: > https://gerrit.ovirt.org/74409 > > Best, > -- > Didi ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Cloud init and vms
Just be sure that the cloud-init service enabled before you create the template, otherwise it will fail to initialize a VM. Best Regards On Thu, Mar 23, 2017 at 1:06 PM, Endre Karlsonwrote: > Hi, is there any prerequisite setup on a Ubuntu vm that is turned into a > template that needs to be done except installing cloud init packages and > sealing the template? > > Endre > > ___ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users > > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] NFS ISO domain from hosted-engine VM
On Thu, Mar 23, 2017 at 4:12 PM, Devin A. Bougiewrote: > Hi, All. Are there any recommendations or best practices WRT whether or not > to host an NFS ISO domain from the hosted-engine VM (running the oVirt Engine > Appliance)? We have a hosted-engine 4.1.1 cluster up and running, and now > just have to decide where to serve the NFS ISO domain from. NFS ISO domain on the engine machine is generally deprecated, and specifically problematic for hosted-engine, see also: https://bugzilla.redhat.com/show_bug.cgi?id=1332813 I recently pushed a patch to remove the question about it altogether: https://gerrit.ovirt.org/74409 Best, -- Didi ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] NFS ISO domain from hosted-engine VM
Hi, All. Are there any recommendations or best practices WRT whether or not to host an NFS ISO domain from the hosted-engine VM (running the oVirt Engine Appliance)? We have a hosted-engine 4.1.1 cluster up and running, and now just have to decide where to serve the NFS ISO domain from. Many thanks, Devin ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] OVS switch type for hosted-engine
Just to close this thread, we were able to manually convert our hosted-engine 4.1.1 cluster from the Legacy to OVS switch types. Very roughly: - Install first host and VM using "hosted-engine --deploy" - In the Engine UI, change Cluster switch type from Legacy to OVS - Shutdown the engine VM and stop vdsmd on the host. - Manually change the switch type to ovs in /var/lib/vdsm/persistence/netconf/nets/ovirtmgmt - Restart the host After that, everything seems to be working and new hosts are correctly setup with the OVS switch type. Thanks, Devin > On Mar 16, 2017, at 4:06 PM, Devin A. Bougiewrote: > > Is it possible to setup a hosted engine using the OVS switch type instead of > Legacy? If it's not possible to start out as OVS, instructions for switching > from Legacy to OVS after the fact would be greatly appreciated. > > Many thanks, > Devin ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] hosted-engine with iscsi storage domain
Hi Simone, On Mar 21, 2017, at 4:06 PM, Simone Tiraboschiwrote: > Did you already add your first storage domain for regular VMs? > If also that one is on iSCSI, it should be connected trough a different iSCSI > portal. Sure enough, once we added the data storage the hosted-storage imported and attached successfully. Both our hosted-storage and our VM data storage are from the same iSCSI target(s), but separate LUNs. Many thanks! Devin ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] ovirt-shell backup
Hello is it possible to execute below actions from the ovirth-shell: 1. Make snapshot ( ovirt-shell -E 'add snapshot --parent-vm-name --description ) 2. Make clone from snaphot above ( ? ) 3. Export clone ( ? ) ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Python-SDK: ovirtsdk4.Connection object autologout?
ovirt-engine-backend-4.1.0.4-1.el7.centos.noarch El 2017-03-23 12:53, Ravi Nori escribió: Can you give me the exact rpm version of ovirt-engine-backend, I can give you a replacement jar file to test On Thu, Mar 23, 2017 at 3:56 AM,wrote: Hi Ravi, Could you please tell me what's the right way to apply this patch on an already working oVirt instance? I already have applied some patches on *.py files, but it seems the *.java files are not there. Thanks! El 2017-03-22 16:06, Ravi Nori escribió: Hi Nicolás, There has been some changes to how a session is refreshed after 4.0. So this is a BZ and is being tracked by BZ 1434605. Will post a patch to fix this. Thanks for reporting the issue. Ravi On Wed, Mar 22, 2017 at 9:10 AM, wrote: Hi Juan, I confirm this was working with 4.0.6 (but the same SDK package). The script is relatively new but I'm 100% sure it has been in execution for several weeks, in contrast to current version where after 5-6 iterations the exception starts showing up. I've voted for the bug and added myself as CC. Thank you. Regards, Nicolás El 2017-03-22 12:58, Juan Hernández escribió: On 03/22/2017 01:50 PM, Juan Hernández wrote: On 03/22/2017 01:10 PM, nico...@devels.es wrote: Hi, We've recently upgraded from oVirt 4.0.x to 4.1.0 and it seems that the behavior of a script we wrote in Python-SDK has changed slightly. We have a script that needs to be executed forever (daemon mode). This daemon creates an ovirtsdk4.Connection object and uses the same Connection object all the time. conn = sdk.Connection( url=URI, username=USERNAME, password=PASSWORD, ca_file=CAFILE ) Between iterations we have ~5 minutes delays which we accomplish with a time.sleep(...) call. After some of these iterations (5 or 6), when trying to perform an operation on the Connection object (in this case, listing all SDs): try: sys_serv = conn.system_service() sd_serv = sys_serv.storage_domains_service() storages = sd_serv.list(search=sd_search_query) except Error, e: log('ERR: Error getting storage domains: %s' % (e)) We start getting exceptions (i.e., the sd_serv.list() call throwing an Error exception) with this message: ERR: Error getting storage domains: HTTP response code is 401. I believe this has something to do with the Connection object expiring (even if it's not idle more than 5 minutes at any time). Is there a way to "refresh" the Connection object so it doesn't auto-logout (assuming this is the actual problem)? As I said, this started happening as of oVirt 4.1.0. ovirt-engine-sdk-python version is 4.1.1. Any ideas? This sound like this bug, opened yesterday: SSO token used for the API expires when running only queries https://bugzilla.redhat.com/1434605 [1] [1] But I thought the same happened in 4.0. Can you confirm that you don't see this problem in 4.0? Open possible workaround is to force a refresh of the backend session sending an external event, like in this example: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131 [2] [2] I also think that we need to modify the SDKs so that they detect expired SSO tokens and renew them automatically. I will open another bug for that. Here is the bug for adding automatic SSO token renew to the SDK, in case you want to follow/vote it: Implement automatic SSO token renew https://bugzilla.redhat.com/1434830 [3] [3] ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users [4] [4] Links: -- [1] https://bugzilla.redhat.com/1434605 [1] [2] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131 [2] [3] https://bugzilla.redhat.com/1434830 [3] [4] http://lists.ovirt.org/mailman/listinfo/users [4] Links: -- [1] https://bugzilla.redhat.com/1434605 [2] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131 [3] https://bugzilla.redhat.com/1434830 [4] http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Python-SDK: ovirtsdk4.Connection object autologout?
Can you give me the exact rpm version of ovirt-engine-backend, I can give you a replacement jar file to test On Thu, Mar 23, 2017 at 3:56 AM,wrote: > Hi Ravi, > > Could you please tell me what's the right way to apply this patch on an > already working oVirt instance? I already have applied some patches on *.py > files, but it seems the *.java files are not there. > > Thanks! > > > El 2017-03-22 16:06, Ravi Nori escribió: > >> Hi Nicolás, >> >> There has been some changes to how a session is refreshed after 4.0. >> So this is a BZ and is being tracked by BZ 1434605. >> >> Will post a patch to fix this. Thanks for reporting the issue. >> >> Ravi >> >> On Wed, Mar 22, 2017 at 9:10 AM, wrote: >> >> Hi Juan, >>> >>> I confirm this was working with 4.0.6 (but the same SDK package). >>> The script is relatively new but I'm 100% sure it has been in >>> execution for several weeks, in contrast to current version where >>> after 5-6 iterations the exception starts showing up. >>> >>> I've voted for the bug and added myself as CC. >>> >>> Thank you. >>> >>> Regards, >>> >>> Nicolás >>> >>> El 2017-03-22 12:58, Juan Hernández escribió: >>> On 03/22/2017 01:50 PM, Juan Hernández wrote: >>> On 03/22/2017 01:10 PM, nico...@devels.es wrote: >>> Hi, >>> >>> We've recently upgraded from oVirt 4.0.x to 4.1.0 and it seems that >>> the >>> behavior of a script we wrote in Python-SDK has changed slightly. >>> We >>> have a script that needs to be executed forever (daemon mode). This >>> daemon creates an ovirtsdk4.Connection object and uses the same >>> Connection object all the time. >>> >>> conn = sdk.Connection( >>> url=URI, >>> username=USERNAME, >>> password=PASSWORD, >>> ca_file=CAFILE >>> ) >>> >>> Between iterations we have ~5 minutes delays which we accomplish >>> with a >>> time.sleep(...) call. >>> >>> After some of these iterations (5 or 6), when trying to perform an >>> operation on the Connection object (in this case, listing all SDs): >>> >>> try: >>> sys_serv = conn.system_service() >>> sd_serv = sys_serv.storage_domains_service() >>> storages = sd_serv.list(search=sd_search_query) >>> except Error, e: >>> log('ERR: Error getting storage domains: %s' % (e)) >>> >>> We start getting exceptions (i.e., the sd_serv.list() call throwing >>> an >>> Error exception) with this message: >>> >>> ERR: Error getting storage domains: HTTP response code is >>> 401. >>> >>> I believe this has something to do with the Connection object >>> expiring >>> (even if it's not idle more than 5 minutes at any time). Is there a >>> way >>> to "refresh" the Connection object so it doesn't auto-logout >>> (assuming >>> this is the actual problem)? >>> >>> As I said, this started happening as of oVirt 4.1.0. >>> ovirt-engine-sdk-python version is 4.1.1. >>> >>> Any ideas? >>> >>> This sound like this bug, opened yesterday: >>> >>> SSO token used for the API expires when running only queries >>> https://bugzilla.redhat.com/1434605 [1] >>> >>> But I thought the same happened in 4.0. Can you confirm that you >>> don't >>> see this problem in 4.0? >>> >>> Open possible workaround is to force a refresh of the backend >>> session >>> sending an external event, like in this example: >>> >>> >>> https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/ >> examples/vm_backup.py#L112-L131 >> >>> [2] >>> >>> I also think that we need to modify the SDKs so that they detect >>> expired >>> SSO tokens and renew them automatically. I will open another bug >>> for that. >>> >> >> Here is the bug for adding automatic SSO token renew to the SDK, in >> case >> you want to follow/vote it: >> >>Implement automatic SSO token renew >>https://bugzilla.redhat.com/1434830 [3] >> ___ >> Users mailing list >> Users@ovirt.org >> http://lists.ovirt.org/mailman/listinfo/users [4] >> >> >> >> Links: >> -- >> [1] https://bugzilla.redhat.com/1434605 >> [2] >> https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/ >> examples/vm_backup.py#L112-L131 >> [3] https://bugzilla.redhat.com/1434830 >> [4] http://lists.ovirt.org/mailman/listinfo/users >> > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] ACTION_TYPE_FAILED_NO_SERVERS_FOR_CLUSTER
Sorry for the delay, I've managed to fix it. It was all due to a permission error in the gluster volume which I created via CLI manually, I forgot to set the vdsm unix user UID and GID permissions to it. After doing that, I could import the new gluster volume as a data domain in the new cluster and then enable Gluster management in the cluster and now everything works as expected! 2017-03-23 12:26 GMT+01:00 Sahina Bose: > Could you provide engine.log from engine and vdsm.log & supervdsm.log from > this host? > > On Wed, Mar 22, 2017 at 8:02 PM, Davide Ferrari > wrote: > >> I get this error when I click " >> Gluster status is disconnected for this host. >> Restart Glusterd service" in the Genral tab of a the sole host in a new >> cluster. I've enabled "Manage Gluster" in the cluster options and already >> created a new gluster volume (via CLI) with bricks only in the hosts that >> are part of this new cluster. >> >> -- >> Davide Ferrari >> Senior Systems Engineer >> >> ___ >> Users mailing list >> Users@ovirt.org >> http://lists.ovirt.org/mailman/listinfo/users >> >> > -- Davide Ferrari Senior Systems Engineer ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] ACTION_TYPE_FAILED_NO_SERVERS_FOR_CLUSTER
Could you provide engine.log from engine and vdsm.log & supervdsm.log from this host? On Wed, Mar 22, 2017 at 8:02 PM, Davide Ferrariwrote: > I get this error when I click " > Gluster status is disconnected for this host. > Restart Glusterd service" in the Genral tab of a the sole host in a new > cluster. I've enabled "Manage Gluster" in the cluster options and already > created a new gluster volume (via CLI) with bricks only in the hosts that > are part of this new cluster. > > -- > Davide Ferrari > Senior Systems Engineer > > ___ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users > > ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] How to attach Host device to VM ?
Hi, I have created an LVM device( /dev/myvg/lvm1 ) in Host. I want that device to attach with VM. Can I attach device to VM via vdsClient ? If yes, please provide me example command that I need to run. Thanks, ~Rohit ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Expand an ovirt+glusterfs cluster
On Wed, Mar 22, 2017 at 8:29 PM, Davide Ferrariwrote: > > > 2017-03-22 8:09 GMT+01:00 Sahina Bose : > > >> >> A gluster volume cannot span multiple clusters. If you want to create a >> separate cluster with the Broadwell nodes, then create a new gluster volume >> using the disks from these nodes - i.e do not expand the existing volume by >> adding bricks from the new servers. >> > > About this: why? > I mean, from the new cluster I can spawn a VM based on an image stored in > the other cluster domain and it works. What's the problem? > Anyway I created a new data domain for that cluster > Each cluster is also created as a gluster trusted storage pool - that is nodes in the cluster are peer probed to each other. A gluster volume can only span one trusted storage pool at a time. ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] ovirt 4.1 - mount recovery iso for failing vm ?
I should have been a little more specific.. a failing hosted engine vm. On 23 March 2017 at 20:24, Ian Neilsenwrote: > Guys > > I've spent the day reading any and all content on recovering a failing to > boot vm under ovirt 4.1 and am finding many cmds are deprecated , old > processes no longer work. > > What is the correct way to mount an iso to perform recovery on a boot > partition of a failing VM in oVirt 4.1? > > vm.conf, virsh, virt-edit, vmhost.xml, vdsClient, new vda, way too many > options and no singular right way to do this that works well. > > -- > Ian Neilsen > > Mobile: 0424 379 762 > Linkedin: http://au.linkedin.com/in/ianneilsen > Twitter : ineilsen > -- Ian Neilsen Mobile: 0424 379 762 Linkedin: http://au.linkedin.com/in/ianneilsen Twitter : ineilsen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Moving from fc based to iSCSI based
On Mon, Mar 20, 2017 at 5:56 PM, Gianluca Cecchiwrote: > On Thu, Mar 9, 2017 at 1:01 PM, Fred Rolland wrote: > >> I don't think it will work. >> We rely heavily on LVM when working with iSCSI and FC and I am not sure >> how LVM will handle this kind of operation. >> A storage domain is a VG that contains PVs (LUNS), and each disk is a LV. >> >> > Actually I executed several times raw "dd" operations to change internal > disks of CentOS servers and in general they did have LVM structures with > PV, VGs, LVs inside > > Finally I had some time to test and it seems it worked without problems. > I created a storage domain of 50Gb with 2 VMs on it and one of them had > also a snapshot. > I was able to import at target a dd-copy of it as an iSCSI domain without > problems. > I also created a template on the source domain, but its import fails: I > get no error message at web admin gui level, but no action executed > actually... on engine log file level I get an error of this type: > > 2017-03-19 01:37:24,387+01 ERROR [org.ovirt.engine.core.bll.CommandsFactory] > (default task-11) [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] An exception has > occurred while trying to create a command object for command ' > ImportVmTemplateFromConfiguration' with parameters > 'ImportVmTemplateParameters:{commandId='ad3c8e81-4787-46bf-97cb-fe3bfa9f891e', > user='null', commandType='Unknown'}': WELD-49: Unable to invoke > protected final void org.ovirt.engine.core.bll.CommandBase.postConstruct() > on org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurat > ionCommand@353de47b > 2017-03-19 01:37:24,388+01 ERROR [org.ovirt.engine.core.bll. > PrevalidatingMultipleActionsRunner] (default task-11) > [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] Failed to execute multiple actions > of type 'ImportVmTemplateFromConfiguration': null > 2017-03-19 01:37:24,388+01 ERROR [org.ovirt.engine.core.bll. > PrevalidatingMultipleActionsRunner] (default task-11) > [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] Exception: > java.lang.NullPointerException > at org.ovirt.engine.core.bll.NestedCommandFactory. > createWrappedCommand(NestedCommandFactory.java:24) [bll.jar:] > > Does it depend on the method or is there any problem in general in > template import for storage domain import? > See below for details of the approach used. > Full engine logs and vdsm logs on target to crosscheck are here: > > vdsm logs > https://drive.google.com/file/d/0BwoPbcrMv8mvUkhtejMxN0QxTUk/ > view?usp=sharing > > engine logs > https://drive.google.com/file/d/0BwoPbcrMv8mvRGpHSU5jOU5IbTQ/ > view?usp=sharing > Any comment to previous e-mail? Are there any known problems with template import? Any chance to see the error logs provided? Thanks, Gianluca ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] ovirt 4.1 - mount recovery iso for failing vm ?
Guys I've spent the day reading any and all content on recovering a failing to boot vm under ovirt 4.1 and am finding many cmds are deprecated , old processes no longer work. What is the correct way to mount an iso to perform recovery on a boot partition of a failing VM in oVirt 4.1? vm.conf, virsh, virt-edit, vmhost.xml, vdsClient, new vda, way too many options and no singular right way to do this that works well. -- Ian Neilsen Mobile: 0424 379 762 Linkedin: http://au.linkedin.com/in/ianneilsen Twitter : ineilsen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] how to handle mount options for hosted engine on glusterfs
I Think I am going to have to go the "virsh" path and mount a guest based cdrom storage device using a live cd and fix the vm disk this way. Meanwhile fix up the fact that vnc and serial console have both been wiped out following the 4.1 upgrade. On 22 March 2017 at 11:52, Ian Neilsenwrote: > Good to know. Ive been using the 1 dash notation following RH document. > Dont think Ive seen the 1 dash before. > > On the original cluster I used IP's second cluster I used FQDN's but made > sure I have a hosts file present. > > On 22 March 2017 at 10:09, /dev/null wrote: > >> Ian, knara, >> >> success! I got it working using the two-dash-notation and ip addresses. >> Shure this is the most relyable way, even with local hosts file. >> >> In my case, the hosted vm dies and takes some time to be running again. >> Is it possible to have the vm surviving the switch to the >> backup-volfile-server? >> >> Thanks & regards >> >> /dev/null >> >> *On Tue, 21 Mar 2017 11:52:32 +0530, knarra wrote* >> > On 03/21/2017 10:52 AM, Ian Neilsen wrote: >> > >> >> >> > >> > knara >> > >> > Looks like your conf is incorrect for mnt option. >> > >> > >> >> Hi Ian, >> > >> > mnt_option should be mnt_options=backup-volfile-servers=: >> and this is how we test it. >> > >> > Thanks >> > kasturi. >> > >> >> >> > >> > It should be I believe; mnt_options=backupvolfile-server=server name >> > >> > not >> > >> > mnt_options=backup-volfile-servers=host2 >> > >> > If your dns isnt working or your hosts file is incorrect this will >> prevent it as well. >> > >> > >> > >> > On 21 March 2017 at 03:30, /dev/null wrote: >> > >>> >>> >>> > Hi kasturi, >>> > >>> > thank you. I tested and it seems not to work, even after rebooting the >>> current mount does not show up the mnt_options nor the switch over works. >>> > >>> > [root@host2 ~]# cat /etc/ovirt-hosted-engine/hosted-engine.conf >>> > ca_cert=/etc/pki/vdsm/libvirt-spice/ca-cert.pem >>> > gateway=192.168.2.1 >>> > iqn= >>> > conf_image_UUID=7bdc29ad-bee6-4a33-8d58-feae9f45d54f >>> > ca_cert=/etc/pki/vdsm/libvirt-spice/ca-cert.pem >>> > sdUUID=1775d440-649c-4921-ba3b-9b6218c27ef3 >>> > connectionUUID=fcf70593-8214-4e8d-b546-63c210a3d5e7 >>> > conf_volume_UUID=06dd17e5-a440-417a-94e8-75929b6f9ed5 >>> > user= >>> > host_id=2 >>> > bridge=ovirtmgmt >>> > metadata_image_UUID=6252c21c-227d-4dbd-bb7b-65cf342154b6 >>> > spUUID=---- >>> > mnt_options=backup-volfile-servers=host2 >>> > fqdn=ovirt.test.lab >>> > portal= >>> > vm_disk_id=1bb9ea7f-986c-4803-ae82-8d5a47b1c496 >>> > metadata_volume_UUID=426ff2cc-58a2-4b83-b22f-3f7dc99890d4 >>> > vm_disk_vol_id=b57d40d2-e68b-440a-bab7-0a9631f4baa4 >>> > domainType=glusterfs >>> > port= >>> > console=qxl >>> > ca_subject="C=EN, L=Test, O=Test, CN=Test" >>> > password= >>> > vmid=272942f3-99b9-48b9-aca4-19ec852f6874 >>> > lockspace_image_UUID=9fbdbfd4-3b31-43ce-80e2-283f0aeead49 >>> > lockspace_volume_UUID=b1e4d3ed-ec78-41cd-9a39-4372f488fb92 >>> > vdsm_use_ssl=true >>> > storage=host1:/gvol0 >>> > conf=/var/run/ovirt-hosted-engine-ha/vm.conf >>> > >>> > [root@host2 ~]# mount |grep gvol0 >>> > host1:/gvol0 on /rhev/data-center/mnt/glusterSD/host1:_gvol0 type >>> fuse.glusterfs (rw,relatime,user_id=0,group_i >>> d=0,default_permissions,allow_other,max_read=131072 <13%2010%2072>) >>> > >>> > Any suggestion? >>> > >>> > I will try an answerfile-install as well later, but it was helpful to >>> know, where to set this. >>> > >>> > Thanks & best regards >>> > >>> * > On Mon, 20 Mar 2017 12:12:25 +0530, knarra wrote* >>> > >>> > > On 03/20/2017 05:09 AM, /dev/null wrote: >>> > > >>> >>> Hi, >>> >>> how do i make the hosted_storage aware of gluster server failure? In >>> --deploy i >>> >>> cannot >>> provide backup-volfile-servers. In >>> /etc/ovirt-hosted-engine/hosted-engine.conf >>> >>> there >>> >>> is >>> an mnt_options line, but i >>> >>> read >>> (https://github.com/oVirt/ovirt-hosted-engine-setup/commit/995c6a65ab897d804f794306cc3654214f2c29b6) >>> that this settings get lost during deployment on seconday >>> >>> servers. >>> >>> Is there an official way to deal with that? Should this option be set >>> manualy on >>> >>> all >>> >>> nodes? >>> >>> Thanks! >>> >>> /dev/null >>> >>> Hi, > >I think in the above patch they are just hiding the the >>> query for mount_options but i think all the code is still present and you >>> should not loose mount options during additional host deployment. For more >>> info you can refer [1]. > > You can set this option manually on all >>> nodes by editing /etc/ovirt-hosted-engine/hosted-engine.conf. Following >>> steps will help you to achieve this. > > 1) Move each host to maintenance, >>> edit the file '/etc/ovirt-hosted-engine/hosted-engine.conf'. > 2) set >>> mnt_options = backup-volfile-servers=: > 3) >>> restart the services 'systemctl restart ovirt-ha-agent' ; 'systemctl >>> restart ovirt-ha-broker' >
Re: [ovirt-users] How to set priority for HA VM via Python SDK ?
On 03/23/2017 08:59 AM, TranceWorldLogic . wrote: > Hi, > > I want to set priority of Highly Available VM as High via python SDK. > I provided information as shown below: > > vm = self.vms_service.add( > vm = types.Vm ( > high_availability = types.HighAvailability( > enabled = True, >priority = 1, > ), > ), > ) > > As see above priority we have to provide as number but in GUI we can > choose drop down menu as ("LOW", "MID" and "HIGH"). > I wan to set priority as "HIGH", which integer value I have to set in > priority ? > I tried with 1 and 3 it shows "LOW" in both cases. > > Please help me. > > Thanks, > ~Rohit > The priority is a value between 0 and 100, and the mapping to the text displayed in the GUI is the following: 0..25 -> LOW 26..74 -> MID 75..100 -> HIGH In the reverse direction: LOW -> 1 MID -> 50 HIGH -> 100 So if you want to set it to HIGH use 'priority = 100'. ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Roadmap
On Wed, Mar 22, 2017 at 11:38 PM, Julián Tetewrote: > Hi Friends of oVirt > > Is there any roadmap for oVirt for 2017 and 2018? > > Any roadmap for oVirt by versions? 4.2.X, 4.3.X, 4.4.X You can get a clue as to what *might* be included by searching bugzilla. E.g. to find all bugs with target milestone currently containing ovirt-4.2: https://bugzilla.redhat.com/buglist.cgi?classification=oVirt=target_milestone=bug_status_id=7207043=substring=notequals_format=advanced=ovirt-4.2=CLOSED Obviously, at this point not everything is there, and some things that are there might be postponed or closed eventually. > > Thank you > > ___ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users > -- Didi ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] How to set priority for HA VM via Python SDK ?
Hi, I want to set priority of Highly Available VM as High via python SDK. I provided information as shown below: vm = self.vms_service.add( vm = types.Vm ( high_availability = types.HighAvailability( enabled = True, priority = 1, ), ), ) As see above priority we have to provide as number but in GUI we can choose drop down menu as ("LOW", "MID" and "HIGH"). I wan to set priority as "HIGH", which integer value I have to set in priority ? I tried with 1 and 3 it shows "LOW" in both cases. Please help me. Thanks, ~Rohit ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] Python-SDK: ovirtsdk4.Connection object autologout?
Hi Ravi, Could you please tell me what's the right way to apply this patch on an already working oVirt instance? I already have applied some patches on *.py files, but it seems the *.java files are not there. Thanks! El 2017-03-22 16:06, Ravi Nori escribió: Hi Nicolás, There has been some changes to how a session is refreshed after 4.0. So this is a BZ and is being tracked by BZ 1434605. Will post a patch to fix this. Thanks for reporting the issue. Ravi On Wed, Mar 22, 2017 at 9:10 AM,wrote: Hi Juan, I confirm this was working with 4.0.6 (but the same SDK package). The script is relatively new but I'm 100% sure it has been in execution for several weeks, in contrast to current version where after 5-6 iterations the exception starts showing up. I've voted for the bug and added myself as CC. Thank you. Regards, Nicolás El 2017-03-22 12:58, Juan Hernández escribió: On 03/22/2017 01:50 PM, Juan Hernández wrote: On 03/22/2017 01:10 PM, nico...@devels.es wrote: Hi, We've recently upgraded from oVirt 4.0.x to 4.1.0 and it seems that the behavior of a script we wrote in Python-SDK has changed slightly. We have a script that needs to be executed forever (daemon mode). This daemon creates an ovirtsdk4.Connection object and uses the same Connection object all the time. conn = sdk.Connection( url=URI, username=USERNAME, password=PASSWORD, ca_file=CAFILE ) Between iterations we have ~5 minutes delays which we accomplish with a time.sleep(...) call. After some of these iterations (5 or 6), when trying to perform an operation on the Connection object (in this case, listing all SDs): try: sys_serv = conn.system_service() sd_serv = sys_serv.storage_domains_service() storages = sd_serv.list(search=sd_search_query) except Error, e: log('ERR: Error getting storage domains: %s' % (e)) We start getting exceptions (i.e., the sd_serv.list() call throwing an Error exception) with this message: ERR: Error getting storage domains: HTTP response code is 401. I believe this has something to do with the Connection object expiring (even if it's not idle more than 5 minutes at any time). Is there a way to "refresh" the Connection object so it doesn't auto-logout (assuming this is the actual problem)? As I said, this started happening as of oVirt 4.1.0. ovirt-engine-sdk-python version is 4.1.1. Any ideas? This sound like this bug, opened yesterday: SSO token used for the API expires when running only queries https://bugzilla.redhat.com/1434605 [1] But I thought the same happened in 4.0. Can you confirm that you don't see this problem in 4.0? Open possible workaround is to force a refresh of the backend session sending an external event, like in this example: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131 [2] I also think that we need to modify the SDKs so that they detect expired SSO tokens and renew them automatically. I will open another bug for that. Here is the bug for adding automatic SSO token renew to the SDK, in case you want to follow/vote it: Implement automatic SSO token renew https://bugzilla.redhat.com/1434830 [3] ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users [4] Links: -- [1] https://bugzilla.redhat.com/1434605 [2] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py#L112-L131 [3] https://bugzilla.redhat.com/1434830 [4] http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] Getting error when i try to assign logical networks to interfaces
I havent set up any hooks and when i try to assign logical networks to an already existing interface on the host ,it gives me this error Hook error: Hook Error: ('Traceback (most recent call last):\n File "/usr/libexec/vdsm/hooks/before_network_setup/50_fcoe", line 18, in \nfrom vdsm.netconfpersistence import RunningConfig\nImportError: No module named netconfpersistence\n',) ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users