Created
September 12, 2016 22:37
-
-
Save bbyhuy/938e695dbcda704bc8d91c950b5c41ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
failed: [infra2_nova_scheduler_container-e701b0ce -> None] (item={'value': {u'interface': u'eth2.41', u'bridge': u'br-mgmt', u'netmask': u'255.255.252.0', u'type': u'veth', u'address': u'172.29.239.179'}, 'key': u'container_address'}) => {"changed": false, "cmd": "/usr/local/bin/lxc-veth-wiring \"infra2_nova_scheduler_container-e701b0ce\" \"701b0ce_eth2.41\" \"eth2.41\" \"br-mgmt\"", "delta": "0:00:00.179523", "end": "2016-09-12 15:33:36.010006", "failed": true, "failed_when_result": true, "item": {"key": "container_address", "value": {"address": "172.29.239.179", "bridge": "br-mgmt", "interface": "eth2.41", "netmask": "255.255.252.0", "type": "veth"}}, "rc": 1, "start": "2016-09-12 15:33:35.830483", "stderr": "\n# Execution example: lxc-veth-wiring.sh testing VETHTEST eth1 br-mgmt\n\n# CLI variables\nCONTAINER_NAME=\"${1}\"\nVETH=\"${2}\"\nINTERFACE=\"${3}\"\nBRIDGE=\"${4}\"\nVETH_PEER=\"$(openssl rand -hex 4)\"\nopenssl rand -hex 4\n\n# PID of running container\nPID=\"$(lxc-info -pHn ${CONTAINER_NAME})\"\nlxc-info -pHn ${CONTAINER_NAME}\n\n# Exit 0 means no change, exit 3 is changed, any other exit is fail.\nEXIT_CODE=0\n\nif ! ip a l \"${VETH}\";then\n ip link add name \"${VETH}\" type veth peer name \"${VETH_PEER}\"\n ip link set dev \"${VETH}\" up\n EXIT=3\nelse\n ip link set dev \"${VETH}\" up\nfi\nDevice \"701b0ce_eth2.41\" does not exist.\n\nif ip a l \"${VETH_PEER}\";then\n ip link set dev \"${VETH_PEER}\" up\n ip link set dev \"${VETH_PEER}\" netns \"${PID}\" name \"${INTERFACE}\"\n EXIT=3\nfi\n\nif ! brctl show \"${BRIDGE}\" | grep -q \"${VETH}\"; then\n brctl addif \"${BRIDGE}\" \"${VETH}\"\n EXIT=3\nfi\n\nlxc-attach --name \"${CONTAINER_NAME}\" <<EOC\n ip link set dev \"${INTERFACE}\" up\n ifdown \"${INTERFACE}\"\n ifup \"${INTERFACE}\"\nEOC\n/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US)\nifdown: interface eth2.41 not configured\nsysctl: cannot stat /proc/sys/net/ipv4/conf/eth2/41/arp_notify: No such file or directory", "stdout": "56: f1575424@701b0ce_eth2.41: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000\n link/ether 2a:fd:98:03:d8:66 brd ff:ff:ff:ff:ff:ff\nFailed to bring up eth2.41.", "stdout_lines": ["56: f1575424@701b0ce_eth2.41: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000", " link/ether 2a:fd:98:03:d8:66 brd ff:ff:ff:ff:ff:ff", "Failed to bring up eth2.41."], "warnings": []} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment