[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
Hi Don, Python SDK is backward compatible, so if you upgrade it to 4.4, you can use it for older oVirt engines from 4.0. Martin On Wed, 5 May 2021, 17:06 Don Dupuis, wrote: > Martin > > That was my problem. While the engine and my host had the correct version > of sdk4, the server that I run my automation scripts from had a too old > version. > > Thanks > Don > > On Wed, May 5, 2021 at 4:20 AM Martin Perina wrote: > >> Hi, >> >> unfortunately we have an issue around generating Python SDK >> documentation, so reboot parameter is not mentioned there yet: >> >> >> http://ovirt.github.io/ovirt-engine-sdk/4.4/services.m.html#ovirtsdk4.services.HostsService.add >> >> Below code snippet looks good, but please make sure that you are using >> python-ovirt-engine-sdk4 >= 4.4.10, which added support for reboot >> parameter. >> >> Regards, >> Martin >> >> >> On Wed, May 5, 2021 at 4:17 AM Don Dupuis wrote: >> >>> Below is my Add_host routine with reboot=False and my host will still >>> reboot on install. What am I doing wrong? It is not giving me errors. >>> >>> def Add_host(): >>> hosts_service = connection.system_service().hosts_service() >>> >>> # Add the host: >>> host = hosts_service.add( >>> types.Host( >>> name='%s' % HOSTNAME, >>> description='%s A Hypervisor' % HOSTNAME, >>> address='%s.%s' % (HOSTNAME, DOMAINNAME), >>> root_password='password', >>> cluster=types.Cluster( >>> name='%s-Locall' % HOSTNAME, >>> ), >>> ), >>> reboot=False, >>> ) >>> >> >> >>> host_service = hosts_service.host_service(host.id) >>> while True: >>> time.sleep(5) >>> host = host_service.get() >>> if host.status == types.HostStatus.UP: >>> break >>> >>> >>> >>> On Tue, May 4, 2021 at 12:15 AM Yedidyah Bar David >>> wrote: >>> On Mon, May 3, 2021 at 6:52 PM Don Dupuis wrote: > > Can you tell me where the default of reboot on install is set as this wasn't this way in 4.3? I don't see an option in engine-config for this and I have looked through the ansible files on my engine vm. Not sure it's possible to change the default. Adding Dana. See also: https://bugzilla.redhat.com/show_bug.cgi?id=1853906 Best regards, -- Didi ___ >>> Users mailing list -- users@ovirt.org >>> To unsubscribe send an email to users-le...@ovirt.org >>> Privacy Statement: https://www.ovirt.org/privacy-policy.html >>> oVirt Code of Conduct: >>> https://www.ovirt.org/community/about/community-guidelines/ >>> List Archives: >>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/QUBDPSF2UNVCLMY5E6DKJYFCI5VBI6KY/ >>> >> >> >> -- >> Martin Perina >> Manager, Software Engineering >> Red Hat Czech s.r.o. >> > ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/IIGJTRD5JQAT3TKPH2VV7RXUWEVV66DB/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
Martin That was my problem. While the engine and my host had the correct version of sdk4, the server that I run my automation scripts from had a too old version. Thanks Don On Wed, May 5, 2021 at 4:20 AM Martin Perina wrote: > Hi, > > unfortunately we have an issue around generating Python SDK documentation, > so reboot parameter is not mentioned there yet: > > > http://ovirt.github.io/ovirt-engine-sdk/4.4/services.m.html#ovirtsdk4.services.HostsService.add > > Below code snippet looks good, but please make sure that you are using > python-ovirt-engine-sdk4 >= 4.4.10, which added support for reboot > parameter. > > Regards, > Martin > > > On Wed, May 5, 2021 at 4:17 AM Don Dupuis wrote: > >> Below is my Add_host routine with reboot=False and my host will still >> reboot on install. What am I doing wrong? It is not giving me errors. >> >> def Add_host(): >> hosts_service = connection.system_service().hosts_service() >> >> # Add the host: >> host = hosts_service.add( >> types.Host( >> name='%s' % HOSTNAME, >> description='%s A Hypervisor' % HOSTNAME, >> address='%s.%s' % (HOSTNAME, DOMAINNAME), >> root_password='password', >> cluster=types.Cluster( >> name='%s-Locall' % HOSTNAME, >> ), >> ), >> reboot=False, >> ) >> > > >> host_service = hosts_service.host_service(host.id) >> while True: >> time.sleep(5) >> host = host_service.get() >> if host.status == types.HostStatus.UP: >> break >> >> >> >> On Tue, May 4, 2021 at 12:15 AM Yedidyah Bar David >> wrote: >> >>> On Mon, May 3, 2021 at 6:52 PM Don Dupuis wrote: >>> > >>> > Can you tell me where the default of reboot on install is set as this >>> wasn't this way in 4.3? I don't see an option in engine-config for this and >>> I have looked through the ansible files on my engine vm. >>> >>> Not sure it's possible to change the default. Adding Dana. >>> >>> See also: >>> >>> https://bugzilla.redhat.com/show_bug.cgi?id=1853906 >>> >>> Best regards, >>> -- >>> Didi >>> >>> ___ >> Users mailing list -- users@ovirt.org >> To unsubscribe send an email to users-le...@ovirt.org >> Privacy Statement: https://www.ovirt.org/privacy-policy.html >> oVirt Code of Conduct: >> https://www.ovirt.org/community/about/community-guidelines/ >> List Archives: >> https://lists.ovirt.org/archives/list/users@ovirt.org/message/QUBDPSF2UNVCLMY5E6DKJYFCI5VBI6KY/ >> > > > -- > Martin Perina > Manager, Software Engineering > Red Hat Czech s.r.o. > ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/SROFYE455N5MIMBY22OHOP6CTRY4BPUH/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
Hi, unfortunately we have an issue around generating Python SDK documentation, so reboot parameter is not mentioned there yet: http://ovirt.github.io/ovirt-engine-sdk/4.4/services.m.html#ovirtsdk4.services.HostsService.add Below code snippet looks good, but please make sure that you are using python-ovirt-engine-sdk4 >= 4.4.10, which added support for reboot parameter. Regards, Martin On Wed, May 5, 2021 at 4:17 AM Don Dupuis wrote: > Below is my Add_host routine with reboot=False and my host will still > reboot on install. What am I doing wrong? It is not giving me errors. > > def Add_host(): > hosts_service = connection.system_service().hosts_service() > > # Add the host: > host = hosts_service.add( > types.Host( > name='%s' % HOSTNAME, > description='%s A Hypervisor' % HOSTNAME, > address='%s.%s' % (HOSTNAME, DOMAINNAME), > root_password='password', > cluster=types.Cluster( > name='%s-Locall' % HOSTNAME, > ), > ), > reboot=False, > ) > > host_service = hosts_service.host_service(host.id) > while True: > time.sleep(5) > host = host_service.get() > if host.status == types.HostStatus.UP: > break > > > > On Tue, May 4, 2021 at 12:15 AM Yedidyah Bar David > wrote: > >> On Mon, May 3, 2021 at 6:52 PM Don Dupuis wrote: >> > >> > Can you tell me where the default of reboot on install is set as this >> wasn't this way in 4.3? I don't see an option in engine-config for this and >> I have looked through the ansible files on my engine vm. >> >> Not sure it's possible to change the default. Adding Dana. >> >> See also: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1853906 >> >> Best regards, >> -- >> Didi >> >> ___ > Users mailing list -- users@ovirt.org > To unsubscribe send an email to users-le...@ovirt.org > Privacy Statement: https://www.ovirt.org/privacy-policy.html > oVirt Code of Conduct: > https://www.ovirt.org/community/about/community-guidelines/ > List Archives: > https://lists.ovirt.org/archives/list/users@ovirt.org/message/QUBDPSF2UNVCLMY5E6DKJYFCI5VBI6KY/ > -- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o. ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/ERXDH3ZBC5BTQK6ZF36SH6OG24D4NRVF/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
Below is my Add_host routine with reboot=False and my host will still reboot on install. What am I doing wrong? It is not giving me errors. def Add_host(): hosts_service = connection.system_service().hosts_service() # Add the host: host = hosts_service.add( types.Host( name='%s' % HOSTNAME, description='%s A Hypervisor' % HOSTNAME, address='%s.%s' % (HOSTNAME, DOMAINNAME), root_password='password', cluster=types.Cluster( name='%s-Locall' % HOSTNAME, ), ), reboot=False, ) host_service = hosts_service.host_service(host.id) while True: time.sleep(5) host = host_service.get() if host.status == types.HostStatus.UP: break On Tue, May 4, 2021 at 12:15 AM Yedidyah Bar David wrote: > On Mon, May 3, 2021 at 6:52 PM Don Dupuis wrote: > > > > Can you tell me where the default of reboot on install is set as this > wasn't this way in 4.3? I don't see an option in engine-config for this and > I have looked through the ansible files on my engine vm. > > Not sure it's possible to change the default. Adding Dana. > > See also: > > https://bugzilla.redhat.com/show_bug.cgi?id=1853906 > > Best regards, > -- > Didi > > ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/QUBDPSF2UNVCLMY5E6DKJYFCI5VBI6KY/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
On Mon, May 3, 2021 at 6:52 PM Don Dupuis wrote: > > Can you tell me where the default of reboot on install is set as this wasn't > this way in 4.3? I don't see an option in engine-config for this and I have > looked through the ansible files on my engine vm. Not sure it's possible to change the default. Adding Dana. See also: https://bugzilla.redhat.com/show_bug.cgi?id=1853906 Best regards, -- Didi ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/D7KEHAWELWV2ASK6LH7J7FFEHWWFXT4P/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
Can you tell me where the default of reboot on install is set as this wasn't this way in 4.3? I don't see an option in engine-config for this and I have looked through the ansible files on my engine vm. Don On Mon, May 3, 2021 at 12:45 AM Yedidyah Bar David wrote: > On Mon, May 3, 2021 at 5:07 AM Don Dupuis wrote: > > > > Hi > > I install alot of hosts via python sdk. My scripts were working > perfectly in 4.3. Now in 4.4 the hosts reboot by default on installation > and I don't want this. I have tried in python and in ansible, but now luck. > Can someone guide me on the best way to achieve this? > > For ansible, you can use 'reboot_after_installation': > > > https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_host_module.html#parameter-reboot_after_installation > > Best regards, > -- > Didi > > ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/2MMQKIGCKMKUFO5FBTAZKTBPKFDU6XUU/
[ovirt-users] Re: Ovirt 4.4.6 - Automate disable of default reboot of host add
On Mon, May 3, 2021 at 5:07 AM Don Dupuis wrote: > > Hi > I install alot of hosts via python sdk. My scripts were working perfectly in > 4.3. Now in 4.4 the hosts reboot by default on installation and I don't want > this. I have tried in python and in ansible, but now luck. Can someone guide > me on the best way to achieve this? For ansible, you can use 'reboot_after_installation': https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_host_module.html#parameter-reboot_after_installation Best regards, -- Didi ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/7CW5WGPBBDRWKON7PEL2PP72M63FR3DQ/