Bug 1033957 - Nova migrate/resize fails with: 'This account is currently not available' [NEEDINFO]
Summary: Nova migrate/resize fails with: 'This account is currently not available'
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: RDO
Classification: Community
Component: openstack-nova
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-24 18:49 UTC by Belmiro Moreira
Modified: 2014-05-22 15:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-22 15:40:38 UTC
kchamart: needinfo? (belmiro.moreira)


Attachments (Terms of Use)

Description Belmiro Moreira 2013-11-24 18:49:36 UTC
Description of problem:
Nova migrate/resize fails with 'This account is currently not available'.
openstack-nova rpm creates the user "nova" but as "/sbin/nologin".

Nova migrate/resize ssh the compute target node and because "nova" user has no shell defined it fails.
I see the migrate/resize as one of the key features in nova. Even if in some environments some ssh configuration needs to be performed in order to work I believe the shell should be defined at user creation time.


Version-Release number of selected component (if applicable):
Grizzly package (2013.1.4-1) but also affects previous versions.

How reproducible:
Install nova and try to migrate/resize a VM.

Actual results:
Fails with:
Command: ssh xxx.xxx.xxx.xxx mkdir -p /var/lib/nova/instances/5023cc16-fdcf-46dd-abd8-478d1767c056
Exit code: 1
Stdout: 'This account is currently not available.\n'
Stderr: "Warning: Permanently added 'xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.\r\n"
  File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 230, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2485, in resize_instance
    block_device_info)
  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3552, in migrate_disk_and_power_off
    shared_storage)
  File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
    self.gen.next()
  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 3528, in migrate_disk_and_power_off
    utils.execute('ssh', dest, 'mkdir', '-p', inst_base)
  File "/usr/lib/python2.6/site-packages/nova/utils.py", line 239, in execute
    cmd=' '.join(cmd))


Expected results:
Perform migration/resize.

Additional info:

Comment 1 Kashyap Chamarthy 2013-12-20 14:16:45 UTC
For testing purpose - (assuming you have a Havana test environment), can you please try if it fixes?

I just tried on my two node Havana setup on Fedora-20:

  $ rpm -q openstack-nova python-nova
  openstack-nova-2013.2-4.fc20.noarch
  python-nova-2013.2-4.fc20.noarch

And, I see a different behavior.

Here's my test:

  # 1. List an active instance:
  $ nova list | grep cirr-guest2
  | e93916df-8d99-4c5e-9c9a-fdff59623677 | cirr-guest2     | ACTIVE | None       | Running     | int=12.0.0.4, 192.169.142.12 |

  # 2. Find out its flavor:
  $ nova show cirr-guest2 | grep flavor
  | flavor                               | m1.tiny (1)                                              |
  $ 

  # 3. Re-size it:
  $ nova resize --poll cirr-guest2 m1.small
  Instance resizing... 100% complete
  Finished
  $ echo $?
  0

  # 4. list the instance again, the Status of it should be VERIFY_RESIZE, 
  # (at-least, according to: http://docs.openstack.org/user-guide/content/nova_cli_resize.html)
  $ nova list | grep cirr-guest2
  | e93916df-8d99-4c5e-9c9a-fdff59623677 | cirr-guest2     | ACTIVE | None       | Running     | int=12.0.0.4, 192.169.142.12 |

  # 5. List the instance actions (you can notice the 'resize' action):
  $ nova instance-action-list cirr-guest2
  +--------+------------------------------------------+---------+----------------------------+
  | Action | Request_ID                               | Message | Start_Time                 |
  +--------+------------------------------------------+---------+----------------------------+
  | create | req-b738f225-c11c-4f0b-a2e6-5a67d91ba20d | None    | 2013-12-11T10:25:30.000000 |
  | resize | req-c531f0f4-6cb7-4fe1-a0b7-da8343575cae | None    | 2013-12-20T13:19:51.000000 |
  | reboot | req-ef8505d3-6778-4aef-8303-609c0f1a26cd | None    | 2013-12-20T13:28:37.000000 |
  +--------+------------------------------------------+---------+----------------------------+

  # 6. Perform a reboot (not necessary, but I included here for completeness' sake)
  $ nova reboot cirr-guest2


  # 7. On Compute node, let's check the information of this disk:
  $ virsh dominfo instance-00000003
  Id:             12
  Name:           instance-00000003
  UUID:           e93916df-8d99-4c5e-9c9a-fdff59623677
  OS Type:        hvm
  State:          running
  CPU(s):         1
  CPU time:       109.9s
  Max memory:     524288 KiB
  Used memory:    524288 KiB
  Persistent:     yes
  Autostart:      disable
  Managed save:   no
  Security model: selinux
  Security DOI:   0
  Security label: system_u:system_r:svirt_tcg_t:s0:c316,c397 (permissive)

  # 8. And, check the size of the disk:
  $ ls -lash /var/lib/nova/instances/e93916df-8d99-4c5e-9c9a-fdff59623677/disk 
  12M -rw-r--r--. 1 qemu qemu 12M Dec 20 08:31 /var/lib/nova/instances/e93916df-8d99-4c5e-9c9a-fdff59623677/disk


Two things: 

 - Why hasn't the instance state turned to VERIFY_RESIZE at step-4? so
   that we could confirm the re-size:

    $ nova resize-confirm cirr-guest2

    (Ref: http://docs.openstack.org/user-guide/content/nova_cli_resize.html)

 -  From steps 7 & 8 of the test, the instance has not resized at all: prior 
    to resize, the instance was tiny, after the resize too, the instance is
    tiny. If successfully resized to 'small' flavor, the instnace should
    have 2048 MB of memory & 20GB of disk.

Comment 2 Kashyap Chamarthy 2013-12-20 16:25:17 UTC
Belmiro,

I haven't tested nnova migrate with latest bits. I hope you have the test environment & time to re-test & report here?


Meanwhile, from a quick conversation with a Nova developer (Nikola Dipanov), Nova should not report resize of an ACTIVE instance as success.

I posted my above test from comment #1 as a separate bug 1045515


Note You need to log in before you can comment on or make changes to this bug.