← Back to team overview

registry team mailing list archive

[Bug 620027] Re: vgcreate/lvcreate in volume/service.py fail and go undetected

 

you are right, if you make sure that the volume group already exists,
the volume creation does work. However, I went back to my config and saw
that I do pass the flag storage_dev=/dev/loop0 on the command line. I
also noticed that I do not pass the --nodaemon switch.

When I launch nova-volume without --nodaemon 'vgcreate' does not seem to
get called. Is that possible? Instead when I launch nova-volume with the
--nodaemon, vgcreate does get called. I did instrument the code and
compared the log output in the two cases (latest lines of the logs are
interesting):

**** NOVA-VOLUME WITHOUT --NODAEMON SWITCH ****
Starting Nova Volume
DEBUG:root:Full set of FLAGS:
DEBUG:root:help : None
DEBUG:root:storage_availability_zone : nova
DEBUG:root:volume_topic : volume
DEBUG:root:verbose : True
DEBUG:root:encrypted : None
DEBUG:root:compute_topic : compute
DEBUG:root:default_kernel : aki-11111
DEBUG:root:report_profile : None
DEBUG:root:rabbit_password : guest
DEBUG:root:syslog : None
DEBUG:root:prefix : nova-volume
DEBUG:root:vpn_key_suffix : -key
DEBUG:root:ec2_url : http://localhost:8773/services/Cloud
DEBUG:root:originalname : None
DEBUG:root:rundir : .
DEBUG:root:profiler : hotshot
DEBUG:root:uid : None
DEBUG:root:connection_type : libvirt
DEBUG:root:fake_rabbit : False
DEBUG:root:s3_port : 3333
DEBUG:root:help_reactors : None
DEBUG:root:rabbit_host : 10.70.177.14
DEBUG:root:source : None
DEBUG:root:process_pool_size : 4
DEBUG:root:umask : None
DEBUG:root:nothotshot : None
DEBUG:root:debug : False
DEBUG:root:fake_storage : False
DEBUG:root:redis_db : 0
DEBUG:root:gid : None
DEBUG:root:volume_group : nova-volumes
DEBUG:root:reactor : None
DEBUG:root:pidfile : /home/openstack/openstack/nova-volume.pid
DEBUG:root:savestats : None
DEBUG:root:rabbit_userid : guest
DEBUG:root:storage_dev : /dev/loop0
DEBUG:root:file : twistd.tap
DEBUG:root:default_instance_type : m1.small
DEBUG:root:report_interval : 10
DEBUG:root:blades_per_shelf : 16
DEBUG:root:node_availability_zone : nova
DEBUG:root:version : None
DEBUG:root:aoe_eth_dev : eth0
DEBUG:root:auth_token_ttl : 3600
DEBUG:root:rabbit_port : 5672
DEBUG:root:chroot : None
DEBUG:root:profile : None
DEBUG:root:euid : None
DEBUG:root:vpn_image_id : ami-CLOUDPIPE
DEBUG:root:logfile : nova-volume.log
DEBUG:root:nodaemon : None
DEBUG:root:b : None
DEBUG:root:last_shelf_id : 149
DEBUG:root:no_save : True
DEBUG:root:aoe_export_dir : /var/lib/vblade-persist/vblades
DEBUG:root:rabbit_virtual_host : /
DEBUG:root:node_name : phantom
DEBUG:root:redis_host : 127.0.0.1
DEBUG:root:spew : None
DEBUG:root:r : None
DEBUG:root:default_image : ami-11111
DEBUG:root:control_exchange : nova
DEBUG:root:default_ramdisk : ari-11111
DEBUG:root:redis_port : 6379
DEBUG:root:s3_host : 127.0.0.1
DEBUG:root:python : /home/openstack/openstack/nova/trunk/bin/nova-volume
DEBUG:root:first_shelf_id : 140
DEBUG:root:fake_network : False
DEBUG:root:network_topic : network
WARNING:root:Starting volume node
DEBUG:root:*** before_pvcreate ***
DEBUG:root:Executing: sudo ['pvcreate', '/dev/loop0']:
DEBUG:root:>> execute
DEBUG:root:<< execute
DEBUG:root:exe output: <Deferred at 0xa700dec  current result: <Deferred at 0xa700e2c>>

The last few lines are logging messages I added in _init_volume_group,
simple_execute and execute. If I execute vgdislay on the shell I get
nothing.

**** NOVA-VOLUME WITH --NODAEMON SWITCH ****

Starting Nova Volume
DEBUG:root:Full set of FLAGS:
DEBUG:root:help : None
DEBUG:root:storage_availability_zone : nova
DEBUG:root:volume_topic : volume
DEBUG:root:verbose : True
DEBUG:root:encrypted : None
DEBUG:root:compute_topic : compute
DEBUG:root:default_kernel : aki-11111
DEBUG:root:report_profile : None
DEBUG:root:rabbit_password : guest
DEBUG:root:syslog : None
DEBUG:root:prefix : nova-volume
DEBUG:root:vpn_key_suffix : -key
DEBUG:root:ec2_url : http://localhost:8773/services/Cloud
DEBUG:root:originalname : None
DEBUG:root:rundir : .
DEBUG:root:profiler : hotshot
DEBUG:root:uid : None
DEBUG:root:connection_type : libvirt
DEBUG:root:fake_rabbit : False
DEBUG:root:s3_port : 3333
DEBUG:root:help_reactors : None
DEBUG:root:rabbit_host : 127.0.0.1
DEBUG:root:source : None
DEBUG:root:process_pool_size : 4
DEBUG:root:umask : None
DEBUG:root:nothotshot : None
DEBUG:root:debug : False
DEBUG:root:fake_storage : False
DEBUG:root:redis_db : 0
DEBUG:root:gid : None
DEBUG:root:volume_group : nova-volumes
DEBUG:root:reactor : None
DEBUG:root:pidfile : /home/openstack/openstack/nova-volume.pid
DEBUG:root:savestats : None
DEBUG:root:rabbit_userid : guest
DEBUG:root:storage_dev : /dev/loop0
DEBUG:root:file : twistd.tap
DEBUG:root:default_instance_type : m1.small
DEBUG:root:report_interval : 10
DEBUG:root:blades_per_shelf : 16
DEBUG:root:node_availability_zone : nova
DEBUG:root:version : None
DEBUG:root:aoe_eth_dev : eth0
DEBUG:root:auth_token_ttl : 3600
DEBUG:root:rabbit_port : 5672
DEBUG:root:chroot : None
DEBUG:root:profile : None
DEBUG:root:euid : None
DEBUG:root:vpn_image_id : ami-CLOUDPIPE
DEBUG:root:logfile : -
DEBUG:root:nodaemon : True
DEBUG:root:b : None
DEBUG:root:last_shelf_id : 149
DEBUG:root:no_save : True
DEBUG:root:aoe_export_dir : /var/lib/vblade-persist/vblades
DEBUG:root:rabbit_virtual_host : /
DEBUG:root:node_name : phantom
DEBUG:root:redis_host : 127.0.0.1
DEBUG:root:spew : None
DEBUG:root:r : None
DEBUG:root:default_image : ami-11111
DEBUG:root:control_exchange : nova
DEBUG:root:default_ramdisk : ari-11111
DEBUG:root:redis_port : 6379
DEBUG:root:s3_host : 10.70.177.40
DEBUG:root:python : /home/openstack/openstack/nova/trunk/bin/nova-volume
DEBUG:root:first_shelf_id : 140
DEBUG:root:fake_network : False
DEBUG:root:network_topic : network
WARNING:root:Starting volume node
DEBUG:root:*** before_pvcreate ***
DEBUG:root:Executing: sudo ['pvcreate', '/dev/loop0']:
DEBUG:root:>> execute
DEBUG:root:<< execute
DEBUG:root:exe output: <Deferred at 0x8f89dec  current result: <Deferred at 0x8f89e2c>>
2010-08-19 10:17:06+0100 [-] Log opened.
2010-08-19 10:17:06+0100 [-] twistd 10.0.0 (/usr/bin/python 2.6.5) starting up.
2010-08-19 10:17:06+0100 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
DEBUG:root:*** after_pvcreate ***
2010-08-19 10:17:06+0100 [-] (root): DEBUG *** after_pvcreate ***
DEBUG:root:Executing: sudo ['vgcreate', 'nova-volumes', '/dev/loop0']:
2010-08-19 10:17:06+0100 [-] (root): DEBUG Executing: sudo ['vgcreate', 'nova-volumes', '/dev/loop0']:
DEBUG:root:>> execute
2010-08-19 10:17:06+0100 [-] (root): DEBUG >> execute
DEBUG:root:<< execute
2010-08-19 10:17:06+0100 [-] (root): DEBUG << execute
DEBUG:root:exe output: <Deferred at 0x8fa608c  current result: <Deferred at 0x8fa660c>>
2010-08-19 10:17:06+0100 [-] (root): DEBUG exe output: <Deferred at 0x8fa608c  current result: <Deferred at 0x8fa660c>>
DEBUG:root:***after vgcreate ***
2010-08-19 10:17:06+0100 [-] (root): DEBUG ***after vgcreate ***

vgdisplay says:

  --- Volume group ---
  VG Name               nova-volumes
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               10.00 GiB
  PE Size               4.00 MiB
  Total PE              2559
  Alloc PE / Size       0 / 0
  Free  PE / Size       2559 / 10.00 GiB
  VG UUID               xiORYR-dJ0P-pu2e-QiDx-nstm-PwWh-7HuJHZ

Hope this help

-- 
vgcreate/lvcreate in volume/service.py fail and go undetected
https://bugs.launchpad.net/bugs/620027
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.



References