Instance directory does not exist: Unable to pre-create chardev file console.log

Bug #984996 reported by Julien Danjou
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Matt Riedemann
Kilo
Fix Released
High
Unassigned

Bug Description

When asking for reboot of an instance, I see the following backtrace in nova-compute.log (Nova 2012.1).

2012-04-18 12:29:33 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 252, in _process_data
2012-04-18 12:29:33 TRACE nova.rpc.amqp rval = node_func(context=ctxt, **node_args)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-04-18 12:29:33 TRACE nova.rpc.amqp return f(*args, **kw)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 153, in decorated_function
2012-04-18 12:29:33 TRACE nova.rpc.amqp function(self, context, instance_uuid, *args, **kwargs)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2012-04-18 12:29:33 TRACE nova.rpc.amqp sys.exc_info())
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-04-18 12:29:33 TRACE nova.rpc.amqp self.gen.next()
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 171, in decorated_function
2012-04-18 12:29:33 TRACE nova.rpc.amqp return function(self, context, instance_uuid, *args, **kwargs)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 898, in reboot_instance
2012-04-18 12:29:33 TRACE nova.rpc.amqp reboot_type)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-04-18 12:29:33 TRACE nova.rpc.amqp return f(*args, **kw)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 707, in reboot
2012-04-18 12:29:33 TRACE nova.rpc.amqp return self._hard_reboot(instance, network_info)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 762, in _hard_reboot
2012-04-18 12:29:33 TRACE nova.rpc.amqp self._create_new_domain(xml)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 1557, in _create_new_domain
2012-04-18 12:29:33 TRACE nova.rpc.amqp domain.createWithFlags(launch_flags)
2012-04-18 12:29:33 TRACE nova.rpc.amqp File "/usr/lib/python2.7/dist-packages/libvirt.py", line 547, in createWithFlags
2012-04-18 12:29:33 TRACE nova.rpc.amqp if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2012-04-18 12:29:33 TRACE nova.rpc.amqp libvirtError: Unable to pre-create chardev file '/var/lib/nova/instances/instance-0000047b/console.log': No such file or directory
2012-04-18 12:29:33 TRACE nova.rpc.amqp

Tags: libvirt
Revision history for this message
Chuck Short (zulcss) wrote :

Is this with kvm?

Changed in nova:
status: New → Incomplete
Revision history for this message
David Kranz (david-kranz) wrote :

I just saw this in a reboot stress test. Using kvm and 2012.1 release.

Revision history for this message
David Kranz (david-kranz) wrote :

I also saw this:

/var/log/nova/nova-compute.log:2012-05-01 15:22:25 ERROR nova.virt.libvirt.connection [-] Getting disk size of instance-00000056: [Errno 2] No such file or directory: '/var/lib/nova/instances/instance-00000056/disk'

Revision history for this message
Julien Danjou (jdanjou) wrote :

Chuck: yes, libvirt and KVM.

Thierry Carrez (ttx)
Changed in nova:
status: Incomplete → New
Revision history for this message
Tomasz Kłosiński (tomasz-michal-klosinski) wrote :
Download full text (4.7 KiB)

I have the same issue. After stress reboot test, nova-compute can't start because of this error:

2012-08-10 11:35:45 CRITICAL nova [-] Unable to pre-create chardev file '/var/lib/nova/instances/instance-00000049/console.log': No such file or directory
2012-08-10 11:35:45 TRACE nova Traceback (most recent call last):
2012-08-10 11:35:45 TRACE nova File "/usr/bin/nova-compute", line 49, in <module>
2012-08-10 11:35:45 TRACE nova service.wait()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 413, in wait
2012-08-10 11:35:45 TRACE nova _launcher.wait()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 131, in wait
2012-08-10 11:35:45 TRACE nova service.wait()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2012-08-10 11:35:45 TRACE nova return self._exit_event.wait()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-08-10 11:35:45 TRACE nova return hubs.get_hub().switch()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-08-10 11:35:45 TRACE nova return self.greenlet.switch()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2012-08-10 11:35:45 TRACE nova result = function(*args, **kwargs)
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
2012-08-10 11:35:45 TRACE nova server.start()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in start
2012-08-10 11:35:45 TRACE nova self.manager.init_host()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 253, in init_host
2012-08-10 11:35:45 TRACE nova self.reboot_instance(context, instance['uuid'])
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
2012-08-10 11:35:45 TRACE nova return f(*args, **kw)
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 159, in decorated_function
2012-08-10 11:35:45 TRACE nova function(self, context, instance_uuid, *args, **kwargs)
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 183, in decorated_function
2012-08-10 11:35:45 TRACE nova sys.exc_info())
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-08-10 11:35:45 TRACE nova self.gen.next()
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
2012-08-10 11:35:45 TRACE nova return function(self, context, instance_uuid, *args, **kwargs)
2012-08-10 11:35:45 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 904, in reboot_instance
2012-08-10 11:35:45 TRACE nova reboot_type)
2012-08-10 11:35:45 TRACE nova File "/usr/lib...

Read more...

Revision history for this message
Tomasz Kłosiński (tomasz-michal-klosinski) wrote :

Here is mentioned instance record (exported to json format - for readability) form nova.instance table:

[
 {
  'created_at' : '2012-07-24 15:15:12',
  'updated_at' : '2012-07-24 15:26:42',
  'deleted_at' : '2012-07-24 15:26:42',
  'deleted' : 1,
  'id' : 2,
  'internal_id' : NULL,
  'user_id' : '1f5039d64f624c9c936177d04f1bc480',
  'project_id' : 'f4ac28a96c0747008142aa0a6ba87169',
  'image_ref' : '9e4e2f95-ccaa-40e7-9079-c7d7c22b8de2',
  'kernel_id' : '',
  'ramdisk_id' : '',
  'server_name' : NULL,
  'launch_index' : 1,
  'key_name' : 'mykey',
  'key_data' : 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtg+MlE5i8BJCcjrgOAE+/NGwBi7k+nREWQnqJ9tOmZ4KJP8UeqIGm52i9fV49d1zvUnK2Ssw8RkVpei/D/9oCtyMdx+mZiFkvOzyhawPypxCmzWBgOTnW5kSnUaMzawIPa7rvBsXpBgjRecCX2X0VNPBkArzidvdGMD1Bz2Lh4Jea1rH+ieAPCG6JU9lRgnmyOBKS9HaQOoTu/YcuZy5Ic2cbQOWk9Vv8z9I8IOJEgOAa+0bOxryrJE1ndftOcqgTx2hGTzOPHKUhuNq4iE8BesQ66Wwc8Vqaf7BNONh+ksFf0qhqKCssCOxUjOD6+yWdoShTqGFZKMC42T86o9vb root@KVM7',
  'power_state' : 1,
  'vm_state' : 'deleted',
  'memory_mb' : 2048,
  'vcpus' : 1,
  'hostname' : '10',
  'host' : 'KVM7',
  'user_data' : '',
  'reservation_id' : 'r-bcv08dl8',
  'scheduled_at' : '2012-07-24 15:15:13',
  'launched_at' : '2012-07-24 15:15:30',
  'terminated_at' : '2012-07-24 15:26:42',
  'display_name' : '10',
  'display_description' : '10',
  'availability_zone' : NULL,
  'locked' : 0,
  'os_type' : NULL,
  'launched_on' : 'KVM7',
  'instance_type_id' : 5,
  'vm_mode' : NULL,
  'uuid' : '3ccd3b88-3ad3-41bf-a074-de94b191bbcb',
  'architecture' : NULL,
  'root_device_name' : '/dev/vda',
  'access_ip_v4' : NULL,
  'access_ip_v6' : NULL,
  'config_drive' : '',
  'task_state' : NULL,
  'default_ephemeral_device' : '/dev/vdb',
  'default_swap_device' : NULL,
  'progress' : 0,
  'auto_disk_config' : NULL,
  'shutdown_terminate' : 1,
  'disable_terminate' : 0,
  'root_gb' : 10,
  'ephemeral_gb' : 20,
  'cell_name' : NULL
 }
]

Revision history for this message
Thierry Carrez (ttx) wrote :

Any sighting of this error in Folsom ? Looks like its due to a DB skew between libvirt and nova...

summary: - Unable to pre-create chardev file
+ Instance directory does not exist: Unable to pre-create chardev file
+ console.log
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Revision history for this message
Thang Pham (thang-pham) wrote :

Is this still a problem in the latest release of nova (icehouse or havana)?

Revision history for this message
Justin Shepherd (jshepher) wrote :

Marking this bug as invalid.

1. It was filed against folsom
2. Bug has not been updated in over 8 months, since last update

Changed in nova:
status: Confirmed → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: Invalid → New
tags: added: libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/173042

Revision history for this message
Matt Riedemann (mriedem) wrote :

Marking for kilo-rc-potential since it appears we've regressed the live migration job since 4/9, possibly with the RPC version caps.

Changed in nova:
status: New → Confirmed
importance: Medium → High
tags: added: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (proposed/kilo)

Fix proposed to branch: proposed/kilo
Review: https://review.openstack.org/173100

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/173042
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f25fbd6c15ba4f2a82f7cec112c2f10995dcc741
Submitter: Jenkins
Branch: master

commit f25fbd6c15ba4f2a82f7cec112c2f10995dcc741
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 13 11:44:46 2015 -0700

    libvirt: add debug logging to pre_live_migration

    There are several conditions checked within pre_live_migration with
    little logging, so add some debug logging to see what we're doing while
    running through this method. This focuses mainly on non-shared storage
    block migration since that's what we're currently testing in the aiopcpu
    job.

    Related-Bug: #984996

    Change-Id: Ia331c967e46e7d1ade42afc1ee37e6de7a246631

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/173099
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4e515ec2269a1c3187ee9ffad3a6be059ec74b0b
Submitter: Jenkins
Branch: master

commit 4e515ec2269a1c3187ee9ffad3a6be059ec74b0b
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 13 14:47:20 2015 -0700

    Pass migrate_data to pre_live_migration

    Commit ebfa09fa197a1d88d1b3ab1f308232c3df7dc009 added an RPC proxy but
    as part of that was passing migrate_data=None for pre_live_migration
    which breaks live block migration when not using shared storage.

    Closes-Bug: #984996

    Change-Id: I2a83f1fb0e4468f9a6c67a188af725c3406139d1

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/174079

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (proposed/kilo)

Change abandoned by Doug Hellmann (<email address hidden>) on branch: proposed/kilo
Review: https://review.openstack.org/173100
Reason: replaced by https://review.openstack.org/174079 in stable/kilo

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/kilo)

Reviewed: https://review.openstack.org/174079
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=33ba90240a2ad3165274d9e54ceb156273404c9a
Submitter: Jenkins
Branch: stable/kilo

commit 33ba90240a2ad3165274d9e54ceb156273404c9a
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 13 14:47:20 2015 -0700

    Pass migrate_data to pre_live_migration

    Commit ebfa09fa197a1d88d1b3ab1f308232c3df7dc009 added an RPC proxy but
    as part of that was passing migrate_data=None for pre_live_migration
    which breaks live block migration when not using shared storage.

    Closes-Bug: #984996

    Change-Id: I2a83f1fb0e4468f9a6c67a188af725c3406139d1
    (cherry picked from commit 4e515ec2269a1c3187ee9ffad3a6be059ec74b0b)

Thierry Carrez (ttx)
tags: removed: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)
Download full text (18.1 KiB)

Reviewed: https://review.openstack.org/179284
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5228d4e418734164ffa5ccd91d2865d9cc659c00
Submitter: Jenkins
Branch: master

commit 906ab9d6522b3559b4ad36d40dec3af20397f223
Author: He Jie Xu <email address hidden>
Date: Thu Apr 16 07:09:34 2015 +0800

    Update rpc version aliases for kilo

    Update all of the rpc client API classes to include a version alias
    for the latest version implemented in Kilo. This alias is needed when
    doing rolling upgrades from Kilo to Liberty. With this in place, you can
    ensure all services only send messages that both Kilo and Liberty will
    understand.

    Closes-Bug: #1444745

    Conflicts:
     nova/conductor/rpcapi.py

    NOTE(alex_xu): The conflict is due to there are some logs already added
    into the master.

    Change-Id: I2952aec9aae747639aa519af55fb5fa25b8f3ab4
    (cherry picked from commit 78a8b5802ca148dcf37c5651f75f2126d261266e)

commit f191a2147a21c7e50926b288768a96900cf4c629
Author: Hans Lindgren <email address hidden>
Date: Fri Apr 24 13:10:39 2015 +0200

    Add security group calls missing from latest compute rpc api version bump

    The recent compute rpc api version bump missed out on the security group
    related calls that are part of the api.

    One possible reason is that both compute and security group client side
    rpc api:s share a single target, which is of little value and only cause
    mistakes like this.

    This change eliminates future problems like this by combining them into
    one to get a 1:1 relationship between client and server api:s.

    Change-Id: I9207592a87fab862c04d210450cbac47af6a3fd7
    Closes-Bug: #1448075
    (cherry picked from commit bebd00b117c68097203adc2e56e972d74254fc59)

commit a2872a9262985bd0ee2c6df4f7593947e0516406
Author: Dan Smith <email address hidden>
Date: Wed Apr 22 09:02:03 2015 -0700

    Fix migrate_flavor_data() to catch instances with no instance_extra rows

    The way the query was being performed previously, we would not see any
    instances that didn't have a row in instance_extra. This could happen if
    an instance hasn't been touched for several releases, or if the data
    set is old.

    The fix is a simple change to use outerjoin instead of join. This patch
    includes a test that ensures that instances with no instance_extra rows
    are included in the migration. If we query an instance without such a
    row, we create it before doing a save on the instance.

    Closes-Bug: #1447132
    Change-Id: I2620a8a4338f5c493350f26cdba3e41f3cb28de7
    (cherry picked from commit 92714accc49e85579f406de10ef8b3b510277037)

commit e3a7b83834d1ae2064094e9613df75e3b07d77cd
Author: OpenStack Proposal Bot <email address hidden>
Date: Thu Apr 23 02:18:41 2015 +0000

    Updated from global requirements

    Change-Id: I5d4acd36329fe2dccb5772fed3ec55b442597150

commit 8c9b5e620eef3233677b64cd234ed2551e6aa182
Author: Divya <email address hidden>
Date: Tue Apr 21 08:26:29 2015 +0200

    Control create/delete flavor api permissions using policy.json

    The permissions of ...

Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-1 → 12.0.0
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.