[RFC] push libvirt-guests to enable compute node vm resumption

Bug #1659507 reported by Ian Kumlien on 2017-01-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Since I can't sign the contributor agreement in gerrit (some kind of failure "Cannot store contact information") I thought that I'd put this here.

Would this be the right way to do it? Any opinions on it?

Anyone that has tested if ON_SHUTDOWN=shutdown is actually required?

commit cf547a3614c7daf937b40c6adddc002e26fd23e3
Author: pomac <email address hidden>
Date: Wed Jan 25 11:13:35 2017 +0100

    [RFC] Push libvirt-guest settings to the container

    According to multiple sources, the problem with vm:s not restarting
    with the compute nodes is due to all things not being available yet.

    This causes the machines to start, see that things are missing and
    shut down again. According to the same sources, ON_SHUTDOWN should
    be set to shutdown instead of suspend - but I really don't know if
    that is the case.

    Since there is no way to currently push this via ansible, this
    patch should implement that basic functionality.

    NOTE: the sysconfig dir is only used on ubuntu and RHEL/centos but
     it seems like thats all kolla-ansible cares about at the moment.

diff --git a/ansible/roles/nova/tasks/config.yml b/ansible/roles/nova/tasks/config.yml
index da21922..9813dec 100644
--- a/ansible/roles/nova/tasks/config.yml
+++ b/ansible/roles/nova/tasks/config.yml
@@ -76,6 +76,7 @@
     - { src: "qemu.conf.j2", dest: "qemu.conf" }
     - { src: "libvirtd.conf.j2", dest: "libvirtd.conf" }
+ - { src: "libvirt-guests.j2", dest: "libvirt-guests" }

 - name: Copying files for nova-ssh
diff --git a/ansible/roles/nova/templates/libvirt-guests.j2 b/ansible/roles/nova/templates/libvirt-guests.j2
new file mode 100644
index 0000000..1364035
--- /dev/null
+++ b/ansible/roles/nova/templates/libvirt-guests.j2
@@ -0,0 +1 @@
diff --git a/ansible/roles/nova/templates/nova-libvirt.json.j2 b/ansible/roles/nova/templates/nova-libvirt.json.j2
index aa19f7a..2f8307b 100644
--- a/ansible/roles/nova/templates/nova-libvirt.json.j2
+++ b/ansible/roles/nova/templates/nova-libvirt.json.j2
@@ -12,6 +12,12 @@
             "dest": "/etc/libvirt/qemu.conf",
             "owner": "root",
             "perm": "0644"
+ },
+ {
+ "source": "{{ container_config_directory }}/libvirt-guests".
+ "dest": "/etc/sysconfig/libvirt-guests",
+ "owner": "root",
+ "perm": "0644"
         }{% if nova_backend == "rbd" %},
             "source": "{{ container_config_directory }}/secrets",

Ian Kumlien (pomac) wrote :
Eduardo Gonzalez (egonzalez90) wrote :

Were you able to sign the agreement to push the patch?

Ian Kumlien (pomac) wrote :

Nope, still can't sign the agreement...

Changed in kolla-ansible:
importance: Undecided → Wishlist
Ian Kumlien (pomac) wrote :

I have since had to sign the agreement, totally forgot about this...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers