Currently doing a cycle of
./stack.sh; ./unstack.sh; ./stack.sh
fails because the leftover tls-proxy sites will cause apache startup to
fail on the second stack.sh run. So we need to disable these sites on
running stop_tls_proxy.
Change-Id: I03e6879be332289d19ca6a656f5f9f139dffff6f
Closes-Bug: 1718189
| ... | ... |
@@ -564,6 +564,20 @@ function follow_tls_proxy {
|
| 564 | 564 |
# using tls configuration are down. |
| 565 | 565 |
function stop_tls_proxy {
|
| 566 | 566 |
stop_apache_server |
| 567 |
+ |
|
| 568 |
+ # NOTE(jh): Removing all tls-proxy configs is a bit of a hack, but |
|
| 569 |
+ # necessary so that we can restart after an unstack. A better |
|
| 570 |
+ # solution would be to ensure that each service calling |
|
| 571 |
+ # start_tls_proxy will call stop_tls_proxy with the same |
|
| 572 |
+ # parameters on shutdown so we can use the disable_apache_site |
|
| 573 |
+ # function and remove individual files there. |
|
| 574 |
+ if is_ubuntu; then |
|
| 575 |
+ sudo rm -f /etc/apache2/sites-enabled/*-tls-proxy.conf |
|
| 576 |
+ else |
|
| 577 |
+ for i in $APACHE_CONF_DIR/*-tls-proxy.conf; do |
|
| 578 |
+ sudo mv $i $i.disabled |
|
| 579 |
+ done |
|
| 580 |
+ fi |
|
| 567 | 581 |
} |
| 568 | 582 |
|
| 569 | 583 |
# Clean up the CA files |