OSA Queens: libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

Bug #1780011 reported by Shivashankar C R
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
OpenStack-Ansible
Fix Released
High
Jesse Pretorius

Bug Description

I have installed stable/queens 17.0.5 using openstack-ansible on Ubuntu with ODL.

When i reboot compute node, instances go in shut off state.

Log in /var/log/nova/nova-compute.log:

2018-07-04 10:00:58.496 5519 ERROR nova.virt.libvirt.host libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

If power fluctuates compute will go down and i have to restart nova-compute on compute node and start all instances.

Is there a fix for this issue?

Status of services after reboot:

root@home:~# service libvirtd status
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-07-04 10:02:56 IST; 25s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 5809 (libvirtd)
    Tasks: 17 (limit: 32768)
   Memory: 25.0M
      CPU: 385ms
   CGroup: /system.slice/libvirtd.service
           └─5809 /usr/sbin/libvirtd

Jul 04 10:02:54 home systemd[1]: Starting Virtualization daemon...
Jul 04 10:02:56 home systemd[1]: Started Virtualization daemon.

root@home:~# service nova-compute status
● nova-compute.service - nova openstack service
   Loaded: loaded (/etc/systemd/system/nova-compute.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2018-07-04 10:00:58 IST; 2min 30s ago
  Process: 5519 ExecStart=/openstack/venvs/nova-17.0.5/bin/nova-compute --log-file=/var/log/nova/nova-compute.log (code=exited, status=0/SUCCESS)
 Main PID: 5519 (code=exited, status=0/SUCCESS)

Jul 04 10:00:53 home systemd[1]: Started nova openstack service.
Jul 04 10:00:56 home nova-compute[5519]: /openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:332: NotSupport
Jul 04 10:00:56 home nova-compute[5519]: exception.NotSupportedWarning

summary: - libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-
- sock': No such file or directory
+ OSA Queens: libvirtError: Failed to connect socket to
+ '/var/run/libvirt/libvirt-sock': No such file or directory
Revision history for this message
Shivashankar C R (shivashankarcr) wrote :

Found the solution for this issue:

libvirtd was starting after nova-compute during boot, so we had this error in nova-compute.

In compute node, for nova-compute service to start first, do the following on ubuntu 16.04

Add "After=libvirtd.service" in /etc/systemd/system/nova-compute.service

For instances to resume to previous state after compute reboot do the following:
set resume_guests_state_on_host_boot to True in /etc/nova/nova.conf

This should be automated by ansible.

Thanks

Changed in nova:
status: New → Invalid
status: Invalid → New
Revision history for this message
melanie witt (melwitt) wrote :

Setting this back to Invalid for nova with the understanding that this is an issue to be addressed in openstack-ansible.

Changed in nova:
status: New → Invalid
Changed in openstack-ansible:
assignee: nobody → Kevin Carter (kevin-carter)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/591101

Changed in openstack-ansible:
assignee: Kevin Carter (kevin-carter) → Kaio Oliveira (kaiokassiano)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/593001

Changed in openstack-ansible:
assignee: Kaio Oliveira (kaiokassiano) → Jesse Pretorius (jesse-pretorius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (master)

Reviewed: https://review.openstack.org/593001
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=da2b8f44440e92a9a25af17dd9737f7177d1e5bc
Submitter: Zuul
Branch: master

commit da2b8f44440e92a9a25af17dd9737f7177d1e5bc
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 17 12:13:36 2018 +0100

    Ensure nova-compute service start after libvirtd

    This patch aims to ensure that the nova-compute systemd service is
    started only after the libvirtd systemd service.

    Closes-Bug: 1780011
    Co-Authored-By: kaiokassiano <email address hidden>
    Change-Id: Ie9b6d83d4a9573be96e050376f756e97895b6e67

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/599614

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_nova (master)

Change abandoned by Jesse Pretorius (odyssey4me) (<email address hidden>) on branch: master
Review: https://review.openstack.org/591101
Reason: This has been implemented in an alternative way in https://review.openstack.org/593001

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/599621

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/599623

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/599624

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (stable/rocky)

Reviewed: https://review.openstack.org/599614
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=6d7b84ca6eeb8481041eb47359cf7d17c7129db4
Submitter: Zuul
Branch: stable/rocky

commit 6d7b84ca6eeb8481041eb47359cf7d17c7129db4
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 17 12:13:36 2018 +0100

    Ensure nova-compute service start after libvirtd

    This patch aims to ensure that the nova-compute systemd service is
    started only after the libvirtd systemd service.

    Closes-Bug: 1780011
    Co-Authored-By: kaiokassiano <email address hidden>
    Change-Id: Ie9b6d83d4a9573be96e050376f756e97895b6e67
    (cherry picked from commit da2b8f44440e92a9a25af17dd9737f7177d1e5bc)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (stable/pike)

Reviewed: https://review.openstack.org/599623
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=4d13fdb20e202e297e39238c87b14eec60d5faad
Submitter: Zuul
Branch: stable/pike

commit 4d13fdb20e202e297e39238c87b14eec60d5faad
Author: Jesse Pretorius <email address hidden>
Date: Tue Sep 4 15:40:23 2018 +0100

    Ensure nova-compute service start after libvirtd

    This patch aims to ensure that the nova-compute systemd service is
    started only after the libvirtd systemd service.

    This is a re-implementation of https://review.openstack.org/593001
    which is required due to the changes in how the services is setup.

    Closes-Bug: 1780011
    Co-Authored-By: kaiokassiano <email address hidden>
    Change-Id: Ie9b6d83d4a9573be96e050376f756e97895b6e67
    (cherry picked from commit 689da211153fb5ebdd7e1fdecbb830a2970250f0)

tags: added: in-stable-pike
tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (stable/ocata)

Reviewed: https://review.openstack.org/599624
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=48e3f0156be1c1bd1c77620ce73957b239561a31
Submitter: Zuul
Branch: stable/ocata

commit 48e3f0156be1c1bd1c77620ce73957b239561a31
Author: Jesse Pretorius <email address hidden>
Date: Tue Sep 4 15:40:23 2018 +0100

    Ensure nova-compute service start after libvirtd

    This patch aims to ensure that the nova-compute systemd service is
    started only after the libvirtd systemd service.

    This is a re-implementation of https://review.openstack.org/593001
    which is required due to the changes in how the services is setup.

    Closes-Bug: 1780011
    Co-Authored-By: kaiokassiano <email address hidden>
    Change-Id: Ie9b6d83d4a9573be96e050376f756e97895b6e67
    (cherry picked from commit 689da211153fb5ebdd7e1fdecbb830a2970250f0)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (stable/queens)

Reviewed: https://review.openstack.org/599621
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=689da211153fb5ebdd7e1fdecbb830a2970250f0
Submitter: Zuul
Branch: stable/queens

commit 689da211153fb5ebdd7e1fdecbb830a2970250f0
Author: Jesse Pretorius <email address hidden>
Date: Tue Sep 4 15:40:23 2018 +0100

    Ensure nova-compute service start after libvirtd

    This patch aims to ensure that the nova-compute systemd service is
    started only after the libvirtd systemd service.

    This is a re-implementation of https://review.openstack.org/593001
    which is required due to the changes in how the services is setup.

    Closes-Bug: 1780011
    Co-Authored-By: kaiokassiano <email address hidden>
    Change-Id: Ie9b6d83d4a9573be96e050376f756e97895b6e67

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova ocata-em

This issue was fixed in the openstack/openstack-ansible-os_nova ocata-em release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova 16.0.29

This issue was fixed in the openstack/openstack-ansible-os_nova 16.0.29 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova queens-eol

This issue was fixed in the openstack/openstack-ansible-os_nova queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova rocky-eol

This issue was fixed in the openstack/openstack-ansible-os_nova rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova stein-eol

This issue was fixed in the openstack/openstack-ansible-os_nova stein-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova train-eol

This issue was fixed in the openstack/openstack-ansible-os_nova train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova ussuri-eol

This issue was fixed in the openstack/openstack-ansible-os_nova ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_nova yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova victoria-eom

This issue was fixed in the openstack/openstack-ansible-os_nova victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova wallaby-eom

This issue was fixed in the openstack/openstack-ansible-os_nova wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova xena-eom

This issue was fixed in the openstack/openstack-ansible-os_nova xena-eom release.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.