Bug 1252433
| Summary: | [Director] YAML Mapping values are not allowed in this context | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Dariusz Smigiel <dariusz.smigiel> |
| Component: | documentation | Assignee: | Dan Macpherson <dmacpher> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.0 (Kilo) | CC: | adahms, adan, dariusz.smigiel, jmelvin, mburns, mcornea, rhel-osp-director-maint, yeylon |
| Target Milestone: | z1 | Keywords: | Documentation, Reopened, ZStream |
| Target Release: | 7.0 (Kilo) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-03-18 03:17:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dariusz Smigiel
2015-08-11 12:04:32 UTC
This appears to be a bug in the documentation, where the example template needs a line break. Dear Dariusz, Thank you for raising this bug. Now assigning to the author of the director content for review. Dan - could you take a look at the above? Kind regards, Andrew Hi Dariusz, I've pushed an update to the documentation with that changes the syntax of NeutronExternalNetworkBridge. The format is now just: # Set to "br-ex" if using floating IPs on native VLAN on bridge br-ex NeutronExternalNetworkBridge: "''" This bug is also related: https://bugzilla.redhat.com/show_bug.cgi?id=1258795 Here are the links for both the Basic and Advanced Scenarios: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Scenario_2_Using_the_CLI_to_Create_a_Basic_Overcloud.html#sect-Isolating_the_External_Network https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Advanced-Scenario_3_Using_the_CLI_to_Create_an_Advanced_Overcloud_with_Ceph_Nodes.html#sect-Advanced-Isolating_all_Networks_into_VLANs I think this should correct the issue you're experiencing. Are any further changes required? No response in several months. Closing this bug, but feel free to reopen if necessary. I have this exact error in my deployment and I am using this documentation https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/chap-Installing_the_Overcloud.html to deploy an OpenStack Platform 7 for Redhat Certification Program. My file shows: [stack@director ~]$ grep NeutronExternalNetworkBridge templates/network-environment.yaml NeutronExternalNetworkBridge: "br-ex" My error is: File "/usr/lib/python2.7/site-packages/heatclient/common/environment_format.py", line 32, in parse raise ValueError(yea) ValueError: while parsing a block mapping in "<byte string>", line 1, column 1 did not find expected key in "<byte string>", line 28, column 3 It's not clear from the documentation how br-ex should be inserted in the file. I've tried 'br-ex' "br-ex" "'br-ex'", indenting with two spaces on the next line default: 'br-ex' and default: "br-ex". Still no success. Hi Alexandru, I suspect there is an indentation issue in your environment file. The proper format in the docs looks ok: parameter_defaults: NeutronExternalNetworkBridge: "''" Can you attach your environment file here? Note that NeutronExternalNetworkBridge defaults to br-ex(see overcloud-without-mergepy.yaml) so you should pass it in the network-environment.yaml only if you want it customized. Setting it to an empty string is recommended since it allows creating multiple overcloud external networks (for details please see external_network_bridge in the neutron l3_agent.ini). Thanks, Marius Hello Marius, thank you for your reply.
I tried also with an empty value for that line, the same error appears.
Here is the environment file:
--- BOF
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: /home/stack/templates/nic-configs/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/templates/nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/templates/nic-configs/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: /home/stack/templates/nic-configs/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: /home/stack/templates/nic-configs/ceph-storage.yaml
parameter_defaults:
ExternalNetCidr: 192.0.1.0/24
ExternalAllocationPools: [{'start': '192.0.1.10', 'end': '192.0.1.50'}]
ExternalNetworkVlanID: 100
# Set to the router gateway on the external network
ExternalInterfaceDefaultRoute: 192.0.1.2
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.0.2.1
# The IP address of the EC2 metadata server. Generally the IP of the Undercloud
EC2MetadataIp: 192.0.2.1
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["8.8.8.8","8.8.4.4"]
# Set to "br-ex" if using floating IPs on native VLAN on bridge br-ex
NeutronExternalNetworkBridge: "'br-ex'"
--- EOF
I am trying to create a basic overcloud just for a certification, the default external network is fine and there is no need for customization.
This looks ok to me as long as the yaml indentation is right(no trailing white spaces or similar). Typically the error that you get indicate this kind of error in the environment file(s). If you need NeutronExternalNetworkBridge set to br-ex you can try removing it from the environment as it defaults to br-ex. Removing the line has no effect. I am starting to believe there is problem in the tripleo templates. Here is the full command and output with --debug: http://paste.openstack.org/show/488515/ OK, I see you are passing multiple environment files including the ones for enabling SSL. Please make sure those are formatted correctly or paste them so I can have a quick look. Hello Marius, Thank you! Here are all the files pasted one by one. http://paste.openstack.org/show/488522/ At a quick glance they look ok so I'd still blame bad formatting. In order to identify the bad environment file you could try eliminating them one by one from the deploy command and see when the deployment goes further. Re-opening as this case. (In reply to Dan Macpherson from comment #16) > Re-opening as this case. I meant, "Re-opening this case." Hi Alexandru, Did you manage to get your issue resolved? - Dan I managed to get the issue solved by doing several actions:
1. I have used this line in network_environment.yaml
NeutronExternalNetworkBridge: "br-ex"
2. Later I received errors and the only way I could find to get passed it was to use another line in the same file:
ExternalIpSubnet: 255.255.255.0
3. In templates/nic-configs/compute.yaml in routes: section of the second interface I had to insert statically next_hop line using the real gateway. This in my case wasn't a blocker but I needed external connectivity for this compute node in particular.
4. After deployment I needed to create external connectivity but tripleo deploys the IP addresses for ha and api endpoints directly on the external interface (nic2 in my case) so steps I needed to take:
- removed IP configuration in ifcfg-<external-nic>:
DEVICE=<external-nic>
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-public
BOOTPROTO=none
- create file ifcfg-br-public:
DEVICE=br-public
BOOTPROTO=static
IPADDR=<external_reachable_IP>
NETMASK=<netmask>
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
DEVICETYPE=ovs
TYPE=OVSBridge
OVSBOOTPROTO=dhcp
OVSDHCPINTERFACES="<external-nic>"
OVS_EXTRA="set bridge br-public other-config:hwaddr=<mac-address-of-external-nic>"
- create and add default routes in route-br-public file
- create the br-public ovs bridge: ovs-vsctl add-br br-public
- add the <external_nic> port to br-public: ovs-vsctl add-port br-public <external_nic>
- change the bridge_mappings directive in /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini:
bridge_mappings =datacentre:br-public
- I rebooted the controller
I need to remind everyone that my external_nic is native vlan and my whole environment was created in vmware workstation using bridged networking for the external nics and host-only networking for the openstack networks.
Sorry for my last comment, I've mixed up the BZ :) The issue was in this file: templates/cloudname.yaml, the directive DnsServers should be of this form: DnsServers: ['8.8.8.8'] Ah, yep I received a separate BZ for this and committed a fix. It should be fixed in the doc now: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Advanced-Scenario_3_Using_the_CLI_to_Create_an_Advanced_Overcloud_with_Ceph_Nodes.html#sect-Advanced-Enabling_SSL_TLS_on_the_Overcloud Switching back to CLOSED. |