neutron subnet-create - Unable to find network with name 'public'
I'm attempting to follow the RDO neutron existing network instructions (script below), but I'm running into the error:
neutron subnet-create --name public_subnet \
--enable_dhcp=False \
--allocation-pool=start=192.168.50.10,end=192.168.50.100 \
--gateway=192.168.50.1 public 192.168.50.0/24
Unable to find network with name 'public'
As a openstack newbie, this error doesn't mean much to me, so any pointers will be appreciated.
The setup script is here:
yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
yum install -y openstack-packstack expect
expect << EOF
set timeout -1
spawn "/usr/bin/packstack" "--install-hosts=10.0.2.15" "--novanetwork-pubif=eth1" "--novacompute-privif=lo" "--novanetwork-privif=lo" "--os-swift-install=y" "--nagios-install=y"
expect "Setting up ssh keys...root@10.0.2.15's password:"
send "vagrant\n"
expect eof
EOF
# virtualbox guests only support type qemu
sed -i 's/^libvirt_type=kvm/libvirt_type=qemu/g' /etc/nova/nova.conf
####################################################################
# start Public network setup
# http://openstack.redhat.com/Neutron_with_existing_external_network
####################################################################
# setup the bridge for the public network -
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.50.4
NETMASK=255.255.255.0 # your netmask
GATEWAY=192.168.50.1
DNS1=10.0.2.2
ONBOOT=yes
EOF
if ! grep "^network_vlan_ranges" /etc/neutron/plugin.ini
then
echo "network_vlan_ranges = physnet1" >> /etc/neutron/plugin.ini
fi
if ! grep "^bridge_mappings" /etc/neutron/plugin.ini
then
echo "bridge_mappings = physnet1:br-ex" >> /etc/neutron/plugin.ini
fi
service network restart
. /root/keystonerc_admin
neutron subnet-create --name public_subnet \
--enable_dhcp=False \
--allocation-pool=start=192.168.50.10,end=192.168.50.100 \
--gateway=192.168.50.1 public 192.168.50.0/24
neutron router-gateway-set router1 public
#######################################
# end Public network setup
#######################################