Ovirt 4.4.6 - Automate disable of default reboot of host add

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? Thanks Don

On Mon, May 3, 2021 at 5:07 AM Don Dupuis <dondster@gmail.com> 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_m... Best regards, -- Didi

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 <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 5:07 AM Don Dupuis <dondster@gmail.com> 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_m...
Best regards, -- Didi

On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> 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

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 <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> 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

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.servic... 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 <dondster@gmail.com> 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 <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> 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-leave@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/QUBDPSF2UNVCLM...
-- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o.

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 <mperina@redhat.com> 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.servic...
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 <dondster@gmail.com> 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 <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> 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-leave@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/QUBDPSF2UNVCLM...
-- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o.

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, <dondster@gmail.com> 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 <mperina@redhat.com> 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.servic...
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 <dondster@gmail.com> 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 <didi@redhat.com> wrote:
On Mon, May 3, 2021 at 6:52 PM Don Dupuis <dondster@gmail.com> 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-leave@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/QUBDPSF2UNVCLM...
-- Martin Perina Manager, Software Engineering Red Hat Czech s.r.o.
participants (3)
-
Don Dupuis
-
Martin Perina
-
Yedidyah Bar David