nova resize not working with KVM

Bug #1617902 reported by Matthew Taylor
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla
Fix Released
High
Matthew Taylor
Liberty
Won't Fix
High
Unassigned
Mitaka
Fix Released
High
Unassigned
Newton
Fix Released
High
Matthew Taylor

Bug Description

Nova resize is not working correctly with nova_ssh container.

http://docs.openstack.org/mitaka/config-reference/compute/resize.html

Expected behaviour is for the target instance to migrate to another nova-compute host in order to increase or decrease resources.

The SSH connection is attempted from nova_compute using the id_rsa key of the 'nova' user.

This does not work as the nova_ssh container as the 'nova' user is configured to use '/sbin/nologin' as it's shell, thus the resize fails.

An example log has been attached.

Revision history for this message
Matthew Taylor (matthew-taylor-f) wrote :
Revision history for this message
Satya Sanjibani Routray (satroutr) wrote :

In the password.yml file please add a | before the private key

Changed in kolla:
status: New → Invalid
assignee: nobody → Satya Sanjibani Routray (satroutr)
Revision history for this message
Matthew Taylor (matthew-taylor-f) wrote :

A simple fix is to change the shell to /bin/bash only for the nova_ssh container, then rebuild the Docker container.

Revision history for this message
Matthew Taylor (matthew-taylor-f) wrote :

https://github.com/openstack/kolla/blob/master/etc/kolla/passwords.yml

this does not contain a "|" before the private key for nova

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

which install type are u using?

ubunt+binary? or something else?

Revision history for this message
shake.chen (shake-chen) wrote :

I try to rebuild vm, also no working.

Revision history for this message
Satya Sanjibani Routray (satroutr) wrote :

Please edit the password.yml file like

nova_ssh_key:
  private_key: |
    -----BEGIN RSA PRIVATE KEY-----
    MIIEowIBAAKCAQEA0+l70gsn0vPUuiyhQn/zrkqROs8ftgRXIaGH9qDepPySiPU8
    dkgwk1vo+ZBt8Go420UU8IG247Wh1tRWG5vF3ztRCBhH7kw6HIcwMmtXwF9t7nKt
    9W3STCq+nf+wrHTGdemZGslz8C3unAm2d/abf4+6O7QQG1pwAnOZoRNoarTn80f9
    -----END RSA PRIVATE KEY-----
  public_key: "
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgDAKzj8H7wf8qySy2cf2JBq1rFvt/ZzCbPOQMJZBZRvAtJISctPgQGtRnz+WMtuGuhuDLlFUPGm"

Revision history for this message
Matthew Taylor (matthew-taylor-f) wrote :

@jeffrey4l: CentOS + Binary.

@satroutr: I understand your point in regards of the Ansible yaml syntaxing (with content spanning multiple lines). I think your issue may be another bug in it's self.

Saying that, I will test it shortly.

Revision history for this message
Matthew Taylor (matthew-taylor-f) wrote :

Had no chance to test satroutr.

Perhaps if you could test and post results?

Take note of this (which I added shortly after I created this bug report):

https://review.openstack.org/#/c/361891/

Revision history for this message
Satya Sanjibani Routray (satroutr) wrote : Re: [Bug 1617902] [NEW] nova resize not working with KVM

Please check the log if the logs are same

There is another issue for which your resize may fail

On Tuesday 30 August 2016, Matthew Taylor <
<email address hidden>> wrote:

> Had no chance to test satroutr.
>
> Perhaps if you could test and post results?
>
> Take note of this (which I added shortly after I created this bug
> report):
>
> https://review.openstack.org/#/c/361891/
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1617902
>
> Title:
> nova resize not working with KVM
>
> Status in kolla:
> Invalid
>
> Bug description:
> Nova resize is not working correctly with nova_ssh container.
>
> http://docs.openstack.org/mitaka/config-reference/compute/resize.html
>
> Expected behaviour is for the target instance to migrate to another
> nova-compute host in order to increase or decrease resources.
>
> The SSH connection is attempted from nova_compute using the id_rsa key
> of the 'nova' user.
>
> This does not work as the nova_ssh container as the 'nova' user is
> configured to use '/sbin/nologin' as it's shell, thus the resize
> fails.
>
> An example log has been attached.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kolla/+bug/1617902/+subscriptions
>

--
Thanks
Satya
Mob:9844101001

No one is the best by birth, Its his brain/ knowledge which make him the
best.

Changed in kolla:
importance: Undecided → High
milestone: none → newton-3
Steven Dake (sdake)
Changed in kolla:
status: Invalid → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/361891
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=c4be56c1e54adb9f1cc6346f1d8849657b0a44ae
Submitter: Jenkins
Branch: master

commit c4be56c1e54adb9f1cc6346f1d8849657b0a44ae
Author: Matthew Taylor <email address hidden>
Date: Mon Aug 29 16:53:27 2016 +1000

    Fix nova_ssh container shell to allow instance resizes.

    According to the configuration reference,
    http://docs.openstack.org/mitaka/config-reference/compute/resize.html
    When using KVM, nova utilizes SSH for instance resizing.
    Kolla nova_ssh container has the nova user configured with "/sbin/nologin" shell,
    which prevents nova_compute from successfully resizing instances.
    Added fix to change shell from nologin to bash.

    Change-Id: I46a48e242dae6ee6c9159bc30edd8b823ffbb515
    Closes-Bug: 1617902

Changed in kolla:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 3.0.0.0b3

This issue was fixed in the openstack/kolla 3.0.0.0b3 development milestone.

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

Reviewed: https://review.openstack.org/414808
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=8aa45550a2186b47df1b926bef373c46e171eca0
Submitter: Jenkins
Branch: stable/mitaka

commit 8aa45550a2186b47df1b926bef373c46e171eca0
Author: Matthew Taylor <email address hidden>
Date: Mon Aug 29 16:53:27 2016 +1000

    Fix nova_ssh container shell to allow instance resizes.

    According to the configuration reference,
    http://docs.openstack.org/mitaka/config-reference/compute/resize.html
    When using KVM, nova utilizes SSH for instance resizing.
    Kolla nova_ssh container has the nova user configured with "/sbin/nologin" shell,
    which prevents nova_compute from successfully resizing instances.
    Added fix to change shell from nologin to bash.

    Change-Id: I46a48e242dae6ee6c9159bc30edd8b823ffbb515
    Closes-Bug: 1617902
    (cherry picked from commit c4be56c1e54adb9f1cc6346f1d8849657b0a44ae)

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

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

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

Reviewed: https://review.openstack.org/445690
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=b68bdabbb45c3be69ec7d6ee3f93b9cdbb95c4a0
Submitter: Jenkins
Branch: master

commit b68bdabbb45c3be69ec7d6ee3f93b9cdbb95c4a0
Author: Mohammed Naser <email address hidden>
Date: Tue Mar 14 20:09:58 2017 -0400

    Refactor and enable shell access

    When installing from binary, packaging tools create a user for
    Keystone which does not have a shell. This results in fernet
    token operations failing due to the fact that `rsync` cannot
    connect over SSH because the Keystone user cannot login.

    This patch addresses this issue by enabling shell access
    to the Keystone user, it also refactors the Nova SSH controller
    to use the pre-existing macro.

    Change-Id: Ic753a94311c5d7d72a82d91c1279dfe982e9afbd
    Related-Bug: #1617902

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to kolla (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/446248

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to kolla (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/446249

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to kolla (stable/newton)

Reviewed: https://review.openstack.org/446249
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=6f971b056ad55f211b84ced9f0be73d130acc15e
Submitter: Jenkins
Branch: stable/newton

commit 6f971b056ad55f211b84ced9f0be73d130acc15e
Author: Mohammed Naser <email address hidden>
Date: Tue Mar 14 20:09:58 2017 -0400

    Refactor and enable shell access

    When installing from binary, packaging tools create a user for
    Keystone which does not have a shell. This results in fernet
    token operations failing due to the fact that `rsync` cannot
    connect over SSH because the Keystone user cannot login.

    This patch addresses this issue by enabling shell access
    to the Keystone user.

    Change-Id: Ic753a94311c5d7d72a82d91c1279dfe982e9afbd
    Related-Bug: #1617902

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to kolla (stable/ocata)

Reviewed: https://review.openstack.org/446248
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=8384ab2c4e4fd7b436827d995d6a60852282d32f
Submitter: Jenkins
Branch: stable/ocata

commit 8384ab2c4e4fd7b436827d995d6a60852282d32f
Author: Mohammed Naser <email address hidden>
Date: Tue Mar 14 20:09:58 2017 -0400

    Refactor and enable shell access

    When installing from binary, packaging tools create a user for
    Keystone which does not have a shell. This results in fernet
    token operations failing due to the fact that `rsync` cannot
    connect over SSH because the Keystone user cannot login.

    This patch addresses this issue by enabling shell access
    to the Keystone user, it also refactors the Nova SSH controller
    to use the pre-existing macro.

    Change-Id: Ic753a94311c5d7d72a82d91c1279dfe982e9afbd
    Related-Bug: #1617902

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 2.0.3

This issue was fixed in the openstack/kolla 2.0.3 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.