데브스택 IP 변경

Jmnote (토론 | 기여)님의 2017년 9월 7일 (목) 13:40 판 (새 문서: ;DevStack - Unable to establish connection to keystone endpoint. ==문제상황== * horizon 로그인시 키스톤 엔드포인트에 접속하지 못하는 오류 발생 https://im...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
DevStack - Unable to establish connection to keystone endpoint.

1 문제상황

  • horizon 로그인시 키스톤 엔드포인트에 접속하지 못하는 오류 발생

https://image.slidesharecdn.com/introduction-openstack-horizon-160805010616/95/introduction-openstackhorizon-8-638.jpg?cb=1470359536

2 DB 변경

stack@ubuntu16:~/devstack$ mysql -uroot -psecret keystone -e "SELECT url FROM endpoint LIMIT 3"
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------------------------------------------+
| url                                          |
+----------------------------------------------+
| http://192.168.43.181:9292                   |
| http://192.168.43.181:8776/v2/$(project_id)s |
| http://192.168.43.181/identity_v2_admin      |
+----------------------------------------------+
stack@ubuntu16:~/devstack$ OLD_IP=192.168.43.181
stack@ubuntu16:~/devstack$ NEW_IP=192.168.56.101
stack@ubuntu16:~/devstack$ mysql -uroot -psecret keystone -e "UPDATE endpoint SET url=REPLACE(url,'$OLD_IP','$NEW_IP');"
mysql: [Warning] Using a password on the command line interface can be insecure.
stack@ubuntu16:~/devstack$ mysql -uroot -psecret keystone -e "SELECT url FROM endpoint LIMIT 3"
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------------------------------------------+
| url                                          |
+----------------------------------------------+
| http://192.168.56.101:9292                   |
| http://192.168.56.101:8776/v2/$(project_id)s |
| http://192.168.56.101/identity_v2_admin      |
+----------------------------------------------+

3 설정파일 변경

  • /etc/ 변경
stack@ubuntu16:~/devstack$ grep -rl "$OLD_IP" /etc/ 2>/dev/null
/etc/cinder/cinder.conf
/etc/openstack/clouds.yaml
/etc/nova/nova-dhcpbridge.conf
... (생략)
stack@ubuntu16:~/devstack$ grep -rl "$OLD_IP" /etc/ 2>/dev/null | xargs sed -i "s/$OLD_IP/$NEW_IP/g"
stack@ubuntu16:~/devstack$  grep -rl "$OLD_IP" /etc/ 2>/dev/null
stack@ubuntu16:~/devstack$  grep -rl "$NEW_IP" /etc/ 2>/dev/null
/etc/cinder/cinder.conf
/etc/openstack/clouds.yaml
/etc/nova/nova-dhcpbridge.conf
... (생략)
  • /opt/stack/ 변경
stack@ubuntu16:~/devstack$ grep -rl "$OLD_IP" /opt/stack/ 2>/dev/null
/opt/stack/devstack/userrc_early
/opt/stack/devstack/accrc/demo/demo
/opt/stack/devstack/accrc/demo/admin
... (생략)
stack@ubuntu16:~/devstack$ grep -rl "$OLD_IP" /opt/stack/ 2>/dev/null | xargs sed -i "s/$OLD_IP/$NEW_IP/g"
stack@ubuntu16:~/devstack$ grep -rl "$OLD_IP" /opt/stack/ 2>/dev/null
stack@ubuntu16:~/devstack$ grep -rl "$NEW_IP" /opt/stack/ 2>/dev/null
/opt/stack/devstack/userrc_early
/opt/stack/devstack/accrc/demo/demo
/opt/stack/devstack/accrc/demo/admin
... (생략)

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}