"데브스택 IP 변경"의 두 판 사이의 차이

81번째 줄: 81번째 줄:
==같이 보기==
==같이 보기==
* [[DevStack]]
* [[DevStack]]
==참고==
* https://www.symantec.com/connect/blogs/change-endpoint-ip-addresses-after-openstack-installation-devstack


[[분류: DevStack]]
[[분류: DevStack]]

2017년 9월 7일 (목) 14:05 판

DevStack - Unable to establish connection to keystone endpoint.

1 문제상황

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

 

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 스태킹

stack@ubuntu16:~/devstack$ ./stack.sh 
... (생략)

5 같이 보기

6 참고

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