Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

[neutron] neutron database does not have version information #941

Open
jameswthorne opened this issue Apr 29, 2014 · 1 comment
Open

[neutron] neutron database does not have version information #941

jameswthorne opened this issue Apr 29, 2014 · 1 comment

Comments

@jameswthorne
Copy link

I have attempted many times to spin up a virtual and physical RPC v4.2.2 environment (non-HA and HA) on CentOS 6.5 and everytime I encounter the following error during the chef-client run:

controller1 Recipe: nova-network::neutron-server
controller1   * service[neutron-server] action restart
controller1 
controller1 ================================================================================
controller1 Error executing action `restart` on resource 'service[neutron-server]'
controller1 ================================================================================
controller1 
controller1 
controller1 Mixlib::ShellOut::ShellCommandFailed
controller1 ------------------------------------
controller1 Expected process to exit with [0], but received '6'
controller1 ---- Begin output of /sbin/service neutron-server restart ----
controller1 STDOUT: Stopping neutron: [FAILED]
controller1 STDERR: neutron-db-check: ERROR: neutron database does not have version information. You must run the "neutron-db-manage stam
p" command before starting neutron services.
controller1 ---- End output of /sbin/service neutron-server restart ----
controller1 Ran /sbin/service neutron-server restart returned 6
controller1 
controller1 
controller1 Resource Declaration:
controller1 ---------------------
controller1 # In /var/chef/cache/cookbooks/nova-network/recipes/neutron-server.rb
controller1 
controller1  87: service "neutron-server" do
controller1  88:   service_name platform_options["neutron_api_service"]
controller1  89:   supports :status => true, :restart => true
controller1  90:   unless api_endpoint["scheme"] == "https"
controller1  91:     action :enable
controller1  92:     subscribes :restart, "template[/etc/neutron/neutron.conf]", :delayed
controller1  93:     subscribes :restart, "template[/etc/neutron/api-paste.ini]", :delayed
controller1  94:     subscribes :restart, "template[/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini]", :delayed
controller1  95:   else
controller1  96:     action [ :disable, :stop ]
controller1  97:   end
controller1  98: end
controller1 
controller1 
controller1 
controller1 Compiled Resource:
controller1 ------------------
controller1 # Declared in /var/chef/cache/cookbooks/nova-network/recipes/neutron-server.rb:87:in `from_file'
controller1 
controller1 service("neutron-server") do
controller1   action [:enable]
controller1   updated true
controller1   supports {:status=>true, :restart=>true}
controller1   retries 0
controller1   retry_delay 2
controller1   service_name "neutron-server"
controller1   enabled true
controller1   pattern "neutron-server"
controller1   startup_type :automatic
controller1   cookbook_name "nova-network"
controller1   recipe_name "neutron-server"
controller1 end
controller1 
controller1 
controller1 
controller1 Recipe: nova-network::neutron-metadata-agent
controller1   * service[neutron-metadata-agent] action restart
controller1 

In addition, I have encountered situations where the chef-client run will complete (with no errors), but upon logging into the controller node, the Neutron service will not be running. When trying to start it, the following error is thrown which matches the chef-client run error above:

Stopping neutron:                                          [FAILED]

neutron-db-check: ERROR: neutron database does not have version information. You must run the "neutron-db-manage stamp" command before starting neutron services.

None of the above problems happen when installing RPC v4.2.2 on top of Ubuntu Server 12.04.

I used the following Vagrantfiles to build the non-HA and HA virtual environment:

https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-centos-neutron-networking.txt

https://raw.githubusercontent.com/jameswthorne/vagrantfiles-rpc/master/vagrantfile-rpcv422-centos-ha-neutron-networking.txt

@cloudnull
Copy link
Contributor

Recent changes in the RHEL package have made this step a requirement prior to starting the neutron server.

neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini stamp havana

This is a known issue in RHEL-ish systems, LINK: http://openstack.redhat.com/forum/discussion/972/stable-havana-2013-2-3-update/p1

(CHL) And the RHEL Issue: https://bugzilla.redhat.com/show_bug.cgi?id=1031801

This is something that we will need to either doc or get into our cookbooks as I was effected by this just a week ago while doing a customer deployment on RHEL. I'm leaning more toward a doc fix as I'm not sure where in the cookbooks this should go.

More discussion on this soon.

@claco claco added this to the v4.2.3 milestone May 23, 2014
claco added a commit to claco/nova-network that referenced this issue May 23, 2014
Process is to stamp the DB and then make a revision note indicating this is an RCBOPS deployment which is then used to ensure that the DB is NOT stamped on subsequent chef runs.

This commit adds new node attr hash to the ["neutron"]["db"]["stamp"]

The DB stamp will only be attempted when the RCBOPS deployment $REVISION
is not found in the neutron db history.

This also fixes some syntax issues we had in addition to making the recipe more legible.

Issue:
rcbops/chef-cookbooks#941
claco added a commit to claco/nova-network that referenced this issue May 23, 2014
Process is to stamp the DB and then make a revision note indicating this is an RCBOPS deployment which is then used to ensure that the DB is NOT stamped on subsequent chef runs.

This commit adds new node attr hash to the ["neutron"]["db"]["stamp"]

The DB stamp will only be attempted when the RCBOPS deployment $REVISION
is not found in the neutron db history.

This also fixes some syntax issues we had in addition to making the recipe more legible.

Issue:
rcbops/chef-cookbooks#941
claco added a commit to claco/nova-network that referenced this issue May 23, 2014
Process is to stamp the DB and then make a revision note indicating this is an RCBOPS deployment which is then used to ensure that the DB is NOT stamped on subsequent chef runs.

This commit adds new node attr hash to the ["neutron"]["db"]["stamp"]

The DB stamp will only be attempted when the RCBOPS deployment $REVISION
is not found in the neutron db history.

This also fixes some syntax issues we had in addition to making the recipe more legible.

Issue:
rcbops/chef-cookbooks#941
claco added a commit to claco/nova-network that referenced this issue May 26, 2014
Process is to stamp the DB and then make a revision note indicating this is an RCBOPS deployment which is then used to ensure that the DB is NOT stamped on subsequent chef runs.

This commit adds new node attr hash to the ["neutron"]["db"]["stamp"]

The DB stamp will only be attempted when the RCBOPS deployment $REVISION
is not found in the neutron db history.

This also fixes some syntax issues we had in addition to making the recipe more legible.

Issue:
rcbops/chef-cookbooks#941

(cherry picked from commit ddfc0e0)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants