Skip to content

Commit

Permalink
Fix multiple default security group conflicts issue (apache#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
liusheng authored and kiwik committed Aug 16, 2018
1 parent a232ab2 commit 5cd49e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions playbooks/docker-machine-functional-devstack/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,21 @@
docker-machine version
export OS_FLAVOR_ID=11
export OS_IMAGE_NAME="Ubuntu 16.04 Server 64bit"
export OS_DOMAIN_ID=default
export OS_SSH_USER=ubuntu
export OS_NETWORK_NAME=private
export OS_FLOATINGIP_POOL=public
export OS_DOMAIN_ID=default
project_id=$(openstack token issue -f value -c project_id)
sg_id=$(openstack security group list | grep default | grep $project_id | head -n 1 | awk '{print $2}')
if [ "{{ global_env.OS_BRANCH }}" == "stable/mitaka" ]; then
sg_cmd_prefix="openstack security group rule create --proto"
else
sg_cmd_prefix="openstack security group rule create --ingress --protocol"
fi
$sg_cmd_prefix tcp --dst-port 22 default
$sg_cmd_prefix tcp --dst-port 2376 default
$sg_cmd_prefix icmp default
$sg_cmd_prefix tcp --dst-port 22 $sg_id
$sg_cmd_prefix tcp --dst-port 2376 $sg_id
$sg_cmd_prefix icmp $sg_id
neutron subnet-update --dns-nameserver 8.8.8.8 private-subnet
openstack flavor create --vcpus 1 --ram 1024 --disk 10 --id 11 docker-machine-test
export DRIVER=openstack
Expand Down
3 changes: 2 additions & 1 deletion roles/create-devstack-local-conf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
EOF
executable: /bin/bash
when:
- global_env.OS_BRANCH == 'stable/mitaka'
global_env.OS_BRANCH == 'stable/mitaka' or
global_env.OS_BRANCH == 'stable/newton'


# Populate local conf with specific service
Expand Down

0 comments on commit 5cd49e5

Please sign in to comment.