openstack-puppet-modules: puppet fail deploy neutron-controller when vlan_range value without '#:#' . Environment (havana A2 2014-02-17.1): ------------- packstack-modules-puppet-2013.2.1-0.24.dev982.el6ost.noarch openstack-foreman-installer-1.0.4-1.el6ost.noarch puppet-3.2.4-3.el6_5.noarch puppet-server-3.2.4-3.el6_5.noarch Steps : -------- 1) Install foreman-server. 2) Edit parameters of neutron-controller hostgroup --> set for ovs_vlan_range 'int_vlan_range:216:217,int_vlan_range:192' (or any number without :192:X) 3) Attempt to run puppet on foreman-client from neutron-controller host group. (puppet agent -t -v) Results: --------- - Puppet failed to run - Error: network vlan ranges are invalid. puppet agent -t -v ( output): -------------------------------- Error: Could not retrieve catalog from remote server: Error 400 on SERVER: network vlan ranges are invalid. on node puma02.scl.lab.tlv.redhat.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Code: ------- the validator code can be found at : (line 30) /usr/share/packstack/modules/neutron/lib/puppet/parser/functions/validate_network_vlan_ranges.rb module Puppet::Parser::Functions newfunction(:validate_network_vlan_ranges) do |args| value = args[0] if not value.kind_of?(Array) value = [value] end value.each do |range| if m = /^(.+:)?(\d+):(\d+)$/.match(range) first_id = Integer(m[-2]) second_id = Integer(m[-1]) if (first_id > 4094) || (second_id > 4094) raise Puppet::Error, "vlan id are invalid." end if ((second_id - first_id) < 0 ) raise Puppet::Error, "network vlan ranges are invalid." end elsif range raise Puppet::Error, "network vlan ranges are invalid." end end end end
Reproduce with : ----------------- packstack-modules-puppet-2013.2.1-0.28.dev989.el6ost.noarch openstack-foreman-installer-1.0.5-1.el6ost.noarch. From foreman_server UI - set the 'neutron-controller' host group , 'ovs_vlan_range' parameter to : int_vlan_range:216:217,int_vlan_range:192 run puppet -t -v : ---------------------- Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Error: Could not retrieve catalog from remote server: Error 400 on SERVER: network vlan ranges are invalid. on node rhos-compute-node-03.lab.eng.rdu2.redhat.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson ** Note- When setting 'ovs_vlan_range' parameter to: int_vlan_range:216:217,int_vlan_range:192:192 run puppet -t -v : ---------------------- There's no such an error.
Steve, this was impacting you - is it okay to simply work around by specifying the same # twice?
When I don't specify the range it means I am not using a VLAN but flat networking. Since I am not using a vlan, I would assume setting a 1 number range would make it use a VLAN which I may not have configured.
to be clear, the parameter this is check is not just used for VLANs but also for other network configuration. This variable allow the creation of OVS physical devices. So when I set up a to use VLANs for my data, I still use flat for my public provider network. i.e. "physint:900:910,physext" Also when I setup to use GRE, VXLAN, I still use a flat provider net. Thus this is set to "physext"
Created attachment 878071 [details] puppet-neutron patch
After some investigation it seems the problem with the value which Nir tested is that validation function expects array, but neutron::plugins::ovs puppet class expects string. This will have to be fixed. Anyway, vlan ranges values above should work with ML2 plugin. Will fix OVS plugin in A4. Sorry about that, I completely missed this bug.
Submitted patch upstream
So the validation passes with the patch from comment 14, but neutron-server is failing with following error: 2014-03-27 15:07:38.430 23242 ERROR neutron.plugins.openvswitch.ovs_neutron_plugin [-] Invalid network VLAN range: 'int_vlan_range:192' - 'need more than 2 values to unpack'. Server terminated! Which concerns me a little bit. So either Neutron has to be fixed or we should get back to not allowing values of above type.
'int_vlan_range:192' is invalid for network_vlan_range. From the code: """Interpret a string as network[:vlan_begin:vlan_end].""" So either "network" or "network:min:max" are valid values.
Great. Omri, where did you find out that you can use values such as 'int_vlan_range:192'?
*** Bug 1078217 has been marked as a duplicate of this bug. ***
Cisco attempted to installed: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: network vlan ranges are invalid. on node labnodenodecontroller.sdulab.com Where they said: 'Here's the complete value I have used "physint:2001:2010,physext:101:110" ' Which I know I used in A2 without problems.
Did you try with or without quotes? There is no need for double quotes. Try without it.
Anyway, physint:2001:2010,physext:101:110 is a valid value with or without this bug fixed.
Verified, ranges value are valid.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-0577.html