The agent ramdisk gets instance images from swift, set firewall
rules to allow this.
Also configure Ironic API port using the correct variable, and
use SWIFT_DEFAULT_BIND_PORT for Swift ports everywhere.
Change-Id: Ieec8cc64e504b04a21daa49e90e2d4925f4838ee
| ... | ... |
@@ -279,7 +279,7 @@ function configure_ironic_conductor {
|
| 279 | 279 |
else |
| 280 | 280 |
die $LINENO "SWIFT_ENABLE_TEMPURLS must be True to use agent_ssh driver in Ironic." |
| 281 | 281 |
fi |
| 282 |
- iniset $IRONIC_CONF_FILE glance swift_endpoint_url http://${HOST_IP}:8080
|
|
| 282 |
+ iniset $IRONIC_CONF_FILE glance swift_endpoint_url http://${HOST_IP}:${SWIFT_DEFAULT_BIND_PORT:-8080}
|
|
| 283 | 283 |
iniset $IRONIC_CONF_FILE glance swift_api_version v1 |
| 284 | 284 |
local tenant_id=$(get_or_create_project $SERVICE_TENANT_NAME) |
| 285 | 285 |
iniset $IRONIC_CONF_FILE glance swift_account AUTH_${tenant_id}
|
| ... | ... |
@@ -523,7 +523,11 @@ function configure_iptables {
|
| 523 | 523 |
sudo modprobe nf_nat_tftp |
| 524 | 524 |
# nodes boot from TFTP and callback to the API server listening on $HOST_IP |
| 525 | 525 |
sudo iptables -I INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true |
| 526 |
- sudo iptables -I INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true |
|
| 526 |
+ sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $IRONIC_HOSTPORT -j ACCEPT || true |
|
| 527 |
+ if [ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]; then |
|
| 528 |
+ # agent ramdisk gets instance image from swift |
|
| 529 |
+ sudo iptables -I INPUT -d $HOST_IP -p tcp --dport ${SWIFT_DEFAULT_BIND_PORT:-8080} -j ACCEPT || true
|
|
| 530 |
+ fi |
|
| 527 | 531 |
} |
| 528 | 532 |
|
| 529 | 533 |
function configure_tftpd {
|
| ... | ... |
@@ -678,6 +682,10 @@ function cleanup_baremetal_basic_ops {
|
| 678 | 678 |
restart_service xinetd |
| 679 | 679 |
sudo iptables -D INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true |
| 680 | 680 |
sudo iptables -D INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true |
| 681 |
+ if [ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]; then |
|
| 682 |
+ # agent ramdisk gets instance image from swift |
|
| 683 |
+ sudo iptables -D INPUT -d $HOST_IP -p tcp --dport ${SWIFT_DEFAULT_BIND_PORT:-8080} -j ACCEPT || true
|
|
| 684 |
+ fi |
|
| 681 | 685 |
sudo rmmod nf_conntrack_tftp || true |
| 682 | 686 |
sudo rmmod nf_nat_tftp || true |
| 683 | 687 |
} |