Devstack install is failing:

Bug #1248923 reported by shivam shukla
102
This bug affects 22 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Unassigned

Bug Description

Devstack install is failing:Please take a look at below error for more detail:

+ sed -i -e '/^\[DEFAULT\]/ a\
flat_network_bridge = br100
' /etc/nova/nova.conf
sed: can't read /etc/nova/nova.conf: Permission denied
+ '[' -n eth0 ']'
+ iniset /etc/nova/nova.conf DEFAULT flat_interface eth0
+ local file=/etc/nova/nova.conf
+ local section=DEFAULT
+ local option=flat_interface
+ local value=eth0
+ grep -q '^\[DEFAULT\]' /etc/nova/nova.conf
+ echo -e '\n[DEFAULT]'
/home/ubuntu/devstack/functions: line 722: /etc/nova/nova.conf: Permission denied
+ ini_has_option /etc/nova/nova.conf DEFAULT flat_interface
+ local file=/etc/nova/nova.conf
+ local section=DEFAULT
+ local option=flat_interface
+ local line
++ sed -ne '/^\[DEFAULT\]/,/^\[.\]/ { /^flat_interface[ \t]=/ p; }' /etc/nova/nova.conf
sed: can't read /etc/nova/nova.conf: Permission denied
+ line=
+ '[' -n '' ']'
+ sed -i -e '/^\[DEFAULT\]/ a\
flat_interface = eth0
' /etc/nova/nova.conf
sed: can't read /etc/nova/nova.conf: Permission denied
++ failed
++ local r=2
+++ jobs -p
++ kill
++ set +o xtrace

Changed in devstack:
assignee: nobody → shivam shukla (shivam-shukla)
assignee: shivam shukla (shivam-shukla) → nobody
Revision history for this message
Sabari Murugesan (smurugesan) wrote :

For me this happened this morning, may not be completely related to what you see, but worth a try :-

After this commit https://github.com/openstack-dev/devstack/commit/5a35e73b3419df571f55efd2a68ef565469e3d1b, I see that nova-common & other openstack packages getting installed as part of novnc's dependency chain.

dpkg --get-selections nova* is now listing nova-common

I tried re-stacking with the variable NOVNC_FROM_PACKAGE=False in localrc and it seems to work.

Ben Nemec (bnemec)
Changed in devstack:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to devstack (master)

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

Revision history for this message
Ben Nemec (bnemec) wrote :

This also manifests as nova-api being unable to start when running devstack.

To make matters worse, the logic for disabling the novnc install from packages is broken, which means novnc will always be installed from packages. The change I just proposed fixes that.

FWIW, I tried to make a similar change a few months ago to install novnc from packages and ran into similar problems. I feel like the deps in Ubuntu are just wrong - novnc should not depend on nova-common as far as I can tell. It's not an OpenStack project so it should be able to run without nova components installed.

Revision history for this message
Pramod J (pramod050480) wrote :

I also get the same error when installing Openstack. I have installed Openstack earlier many times using the same devstack script. Looks like a recent bug.

013-11-09 18:55:55 + grep -q '^\[DEFAULT\]' /etc/nova/nova.conf
2013-11-09 18:55:55 + echo -e '\n[DEFAULT]'
2013-11-09 18:55:55 /opt/stack/devstack/functions: line 722: /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 + ini_has_option /etc/nova/nova.conf DEFAULT flat_network_bridge
2013-11-09 18:55:55 + local file=/etc/nova/nova.conf
2013-11-09 18:55:55 + local section=DEFAULT
2013-11-09 18:55:55 + local option=flat_network_bridge
2013-11-09 18:55:55 + local line
2013-11-09 18:55:55 ++ sed -ne '/^\[DEFAULT\]/,/^\[.*\]/ { /^flat_network_bridge[ \t]*=/ p; }' /etc/nova/nova.conf
2013-11-09 18:55:55 sed: can't read /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 + line=
2013-11-09 18:55:55 + '[' -n '' ']'
2013-11-09 18:55:55 + sed -i -e '/^\[DEFAULT\]/ a\
2013-11-09 18:55:55 flat_network_bridge = br100
2013-11-09 18:55:55 ' /etc/nova/nova.conf
2013-11-09 18:55:55 sed: can't read /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 + '[' -n eth0 ']'
2013-11-09 18:55:55 + iniset /etc/nova/nova.conf DEFAULT flat_interface eth0
2013-11-09 18:55:55 + local file=/etc/nova/nova.conf
2013-11-09 18:55:55 + local section=DEFAULT
2013-11-09 18:55:55 + local option=flat_interface
2013-11-09 18:55:55 + local value=eth0
2013-11-09 18:55:55 + grep -q '^\[DEFAULT\]' /etc/nova/nova.conf
2013-11-09 18:55:55 + echo -e '\n[DEFAULT]'
2013-11-09 18:55:55 /opt/stack/devstack/functions: line 722: /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 + ini_has_option /etc/nova/nova.conf DEFAULT flat_interface
2013-11-09 18:55:55 + local file=/etc/nova/nova.conf
2013-11-09 18:55:55 + local section=DEFAULT
2013-11-09 18:55:55 + local option=flat_interface
2013-11-09 18:55:55 + local line
2013-11-09 18:55:55 ++ sed -ne '/^\[DEFAULT\]/,/^\[.*\]/ { /^flat_interface[ \t]*=/ p; }' /etc/nova/nova.conf
2013-11-09 18:55:55 sed: can't read /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 + line=
2013-11-09 18:55:55 + '[' -n '' ']'
2013-11-09 18:55:55 + sed -i -e '/^\[DEFAULT\]/ a\
2013-11-09 18:55:55 flat_interface = eth0
2013-11-09 18:55:55 ' /etc/nova/nova.conf
2013-11-09 18:55:55 sed: can't read /etc/nova/nova.conf: Permission denied
2013-11-09 18:55:55 ++ failed
2013-11-09 18:55:55 ++ local r=2
2013-11-09 18:55:55 +++ jobs -p
2013-11-09 18:55:55 ++ kill
2013-11-09 18:55:55 ++ set +o xtrace
2013-11-09 18:55:55 stack.sh failed: full log in /opt/stack/logs/stack.sh.log.2013-11-09-184436

Revision history for this message
VaraKalyan (varakalyanmaddi) wrote :

I met with this error in my machine.
Any workarounds for this ?

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

Reviewed: https://review.openstack.org/55685
Committed: http://github.com/openstack-dev/devstack/commit/add4ca3ef0f916e31a781e118c8c4d04a9bec5cf
Submitter: Jenkins
Branch: master

commit add4ca3ef0f916e31a781e118c8c4d04a9bec5cf
Author: Ben Nemec <email address hidden>
Date: Fri Nov 8 17:22:51 2013 +0000

    Fix FROM_PACKAGE checks for novnc and spice

    The logic for installing novnc and spice from packages is broken,
    which makes it impossible to install from git, which makes bug
    1248923 more serious.

    Change-Id: I9ae722a5470a16555bca9018da342485f6d3e896
    Related-Bug: 1248923

Revision history for this message
Craig Vyvial (cp16net) wrote :

Looks like this same bug is still affecting me after the review was merged.
Anyone else still see it with ubuntu precise?

Revision history for this message
Ryan Hsu (rhsu) wrote :

Craig, I'm also seeing this bug on a brand new Ubuntu 12.04 and fresh devstack with the patch above.

Revision history for this message
Pradeep Kumar Chandani (pradeep-chandani) wrote :

Still its not working..as still facing same error.

Revision history for this message
Ilya Kharin (akscram) wrote :

The patch fixes some problem of using of the trueorfalse function but the nova-common still installed with the novnc by default. To install the nonvc from git repo you should to add this line into your localrc:

NOVNC_FROM_PACKAGE=false

By the way, do not forget to remove the packages that you installed earlier:

$ sudo apt-get remove novnc python-novnc nova-common python-nova python-novaclient

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

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

Revision history for this message
Craig Vyvial (cp16net) wrote :

This latest patch seems to fix the issue for me. Thanks!

Revision history for this message
Ilya Kharin (akscram) wrote :

It's just a workaround because the novnc package depends on nova-common. So, actually the installation of the novnc from a package still remains problematic.

Ben, the nova-novncproxy executable script actually requires configuration files of the Nova (nova-common), the common library of the Nova (python-nova, implicit dependency) and the python-novnc package. Also, the novnc provides this script. Actually, some parts of the novnc will not work without this dependencies.

Revision history for this message
Peter Wilson (peterwilson-69) wrote :

I'm a OpenStack/DevStack newbie - So what's the best way of moving forward? Is the following correct?

1) Apply the patch
2) Add "NOVNC_FROM_PACKAGE=false" to localrc
3) Remove nova software

$ sudo apt-get remove novnc python-novnc nova-common python-nova python-novaclient

4) ./unstack.sh
5) ./stack.sh

I've tried this and it's not working for me; nova-api did not start, and I can't login to web interface.

HTTPConnectionPool(host='10.0.0.16', port=8774): Max retries exceeded with url: /v2/b1c7ce89ccc14944b3f35d9d82f259ae/extensions (Caused by <class 'socket.error'>: [Errno 111] Connection refused)

Revision history for this message
Ilya Kharin (akscram) wrote :

Peter, you can check that rights of files /etc/nova/* have got a correct value after removing of packages, otherwise you should to fix it. Of course, if the files are exist.

Revision history for this message
Hugh Saunders (hughsaunders) wrote :

Another problem with nova-common getting installed is that it installs a nova-rootwrap script that tries to import rootwrap from the pre-oslo location. This causes nova-api to loop on startup.

stack@devstack:~$ sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c
Traceback (most recent call last):
  File "/usr/bin/nova-rootwrap", line 59, in <module>
    from nova.rootwrap import wrapper
ImportError: No module named rootwrap

stack@devstack:~$ dpkg -S /usr/bin/nova-rootwrap
nova-common: /usr/bin/nova-rootwrap

stack@devstack:~$ sudo /usr/local/bin/nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c
# Generated by iptables-save v1.4.12 on Thu Nov 14 17:22:50 2013
*nat
:PREROUTING ACCEPT [17:872]
<snip>

Revision history for this message
Ilya Kharin (akscram) wrote :

Hugh, It's a definitely mistake that mixed binaries from a package with code libraries from source repositories should work together. They may haven't compatibility with each other. That is to say for this reason you are getting something that is not expected.

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

Reviewed: https://review.openstack.org/55992
Committed: http://github.com/openstack-dev/devstack/commit/645171c5fdfa1d43441c411c00c8080218cb6bbe
Submitter: Jenkins
Branch: master

commit 645171c5fdfa1d43441c411c00c8080218cb6bbe
Author: Ilya Kharin <email address hidden>
Date: Tue Nov 12 12:44:20 2013 +0400

    Don't install novnc from package by default

    By default the installation is failed because the novnc package has got
    the a dependency of the nova-common package. The last package provides
    "/etc/nova/*" files with appropriate privileges. It potentially brings
    to the problem of an access to those files.

    Change-Id: I1689bef817365b10bf972dc4a8033892ad5939d1
    Related-Bug: 1248923

Revision history for this message
Cong To Thanh (congto) wrote :

you can chmod and chown for /etc/nova. After, run .stack.sh

Revision history for this message
Jeff Applewhite (ajeffrey) wrote :

This bug is causing failures on all of our (previously) automated builds at NetApp. Can it be set to a high priority and assigned to someone to fix please?

Revision history for this message
Jeff Applewhite (ajeffrey) wrote :

I just retested on Ubuntu 13.04 and the issue does not affect that release.

Revision history for this message
Ilya Kharin (akscram) wrote :

Jeff, the small fix was already merged to master. Please, look at https://review.openstack.org/55992.

Dean Troyer (dtroyer)
Changed in devstack:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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