Я настраиваю пример архитектуры из http://docs.openstack.org/newton/install-guide-rdo/
Я в главе Запустить экземпляр
Когда я запускаю экземпляр, я получаю следующее сообщение об ошибке, отображаемое в информации об экземпляре:
Build of instance bcaa06fe-99ca-4db7-baf3-633f21b16f61 aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='control
Когда я просматриваю журналы своего вычислительного узла в /var/log/nova/nova-compute.log, я замечаю следующие два сообщения об ошибках:
Как отладить и решить эту проблему?
/var/log/nova/nova-compute.log
2017-01-02 02:36:03.290 2309 ERROR nova.compute.manager [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Instance failed network setup after 1 attempt(s)
2017-01-02 02:36:03.290 2309 ERROR nova.compute.manager ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6608f90>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:36:03.290 2309 ERROR nova.compute.manager
2017-01-02 02:36:03.535 2309 ERROR nova.image.glance [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Error contacting glance server 'http://controller:9292' for 'data', done trying.
2017-01-02 02:36:03.535 2309 ERROR nova.image.glance CommunicationError: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x86fba90>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:36:03.535 2309 ERROR nova.image.glance
2017-01-02 02:36:03.561 2309 ERROR nova.compute.manager [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: c854d552-037c-4e84-a953-9610b6a6670d] Instance failed to spawn
2017-01-02 02:36:03.561 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d] GlanceConnectionFailed: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x86fba90>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:36:03.561 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d]
2017-01-02 02:36:03.678 2309 ERROR nova.compute.manager [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: c854d552-037c-4e84-a953-9610b6a6670d] Failed to deallocate network for instance. Error: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=c854d552-037c-4e84-a953-9610b6a6670d: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=c854d552-037c-4e84-a953-9610b6a6670d (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x875bed0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:36:03.846 2309 ERROR nova.compute.manager [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: c854d552-037c-4e84-a953-9610b6a6670d] Build of instance c854d552-037c-4e84-a953-9610b6a6670d aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x86fba90>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:36:03.846 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d] BuildAbortException: Build of instance c854d552-037c-4e84-a953-9610b6a6670d aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x86fba90>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:36:03.846 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d]
2017-01-02 02:36:03.872 2309 ERROR nova.compute.manager [req-2224a009-1cf2-4b84-b654-05c79d688b7b cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: c854d552-037c-4e84-a953-9610b6a6670d] Failed to deallocate networks
2017-01-02 02:36:03.872 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d] ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=c854d552-037c-4e84-a953-9610b6a6670d: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=c854d552-037c-4e84-a953-9610b6a6670d (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x8772d90>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:36:03.872 2309 ERROR nova.compute.manager [instance: c854d552-037c-4e84-a953-9610b6a6670d]
2017-01-02 02:48:49.652 2309 ERROR nova.compute.manager [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Instance failed network setup after 1 attempt(s)
2017-01-02 02:48:49.652 2309 ERROR nova.compute.manager ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x662f510>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:48:49.652 2309 ERROR nova.compute.manager
2017-01-02 02:48:49.807 2309 ERROR nova.image.glance [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Error contacting glance server 'http://controller:9292' for 'data', done trying.
2017-01-02 02:48:49.807 2309 ERROR nova.image.glance CommunicationError: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87dec50>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:48:49.807 2309 ERROR nova.image.glance
2017-01-02 02:48:49.807 2309 ERROR nova.compute.manager [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] Instance failed to spawn
2017-01-02 02:48:49.807 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] GlanceConnectionFailed: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87dec50>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:48:49.807 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91]
2017-01-02 02:48:49.896 2309 ERROR nova.compute.manager [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] Failed to deallocate network for instance. Error: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87de550>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:48:50.064 2309 ERROR nova.compute.manager [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] Build of instance 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91 aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87dec50>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:48:50.064 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] BuildAbortException: Build of instance 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91 aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87dec50>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 02:48:50.064 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91]
2017-01-02 02:48:50.066 2309 ERROR nova.compute.manager [req-dfd82484-3bfd-4bc7-92eb-029ee52bf579 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] Failed to deallocate networks
2017-01-02 02:48:50.066 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91] ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87e25d0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 02:48:50.066 2309 ERROR nova.compute.manager [instance: 79a943ae-7c5f-44a9-a5c9-c7f68c6f8b91]
2017-01-02 04:46:25.063 2309 ERROR nova.compute.manager [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Instance failed network setup after 1 attempt(s)
2017-01-02 04:46:25.063 2309 ERROR nova.compute.manager ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/networks.json?id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x88a34d0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 04:46:25.063 2309 ERROR nova.compute.manager
2017-01-02 04:46:25.227 2309 ERROR nova.image.glance [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] Error contacting glance server 'http://controller:9292' for 'data', done trying.
2017-01-02 04:46:25.227 2309 ERROR nova.image.glance CommunicationError: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x8772190>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 04:46:25.227 2309 ERROR nova.image.glance
2017-01-02 04:46:25.228 2309 ERROR nova.compute.manager [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] Instance failed to spawn
2017-01-02 04:46:25.228 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] GlanceConnectionFailed: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x8772190>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 04:46:25.228 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61]
2017-01-02 04:46:25.330 2309 ERROR nova.compute.manager [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] Failed to deallocate network for instance. Error: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=bcaa06fe-99ca-4db7-baf3-633f21b16f61: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=bcaa06fe-99ca-4db7-baf3-633f21b16f61 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x876fc50>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 04:46:25.494 2309 ERROR nova.compute.manager [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] Build of instance bcaa06fe-99ca-4db7-baf3-633f21b16f61 aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x8772190>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 04:46:25.494 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] BuildAbortException: Build of instance bcaa06fe-99ca-4db7-baf3-633f21b16f61 aborted: Connection to glance host http://controller:9292 failed: Error finding address for http://controller:9292/v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/images/41dc78dd-963d-4a84-a872-35d1d3cb3f7c/file (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x8772190>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH',))
2017-01-02 04:46:25.494 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61]
2017-01-02 04:46:25.496 2309 ERROR nova.compute.manager [req-3b4a7b20-fa9f-4f59-ab90-3d914395add4 cb356159afe8419593c567ed59ecf8de 9de892a2176a4744ba7bfda9ba47f62c - - -] [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] Failed to deallocate networks
2017-01-02 04:46:25.496 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61] ConnectFailure: Unable to establish connection to http://127.0.0.1:9696/v2.0/ports.json?device_id=bcaa06fe-99ca-4db7-baf3-633f21b16f61: HTTPConnectionPool(host='127.0.0.1', port=9696): Max retries exceeded with url: /v2.0/ports.json?device_id=bcaa06fe-99ca-4db7-baf3-633f21b16f61 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x87e7650>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2017-01-02 04:46:25.496 2309 ERROR nova.compute.manager [instance: bcaa06fe-99ca-4db7-baf3-633f21b16f61]
Похоже, мне пришлось создать изображение, указав его ID вместо его имени в параметрах командной строки.
НЕПРАВИЛЬНО
openstack server create --flavor m1.nano --image cirros --nic net-id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56 --security-group default --key-name mykey provider-instance
ВЕРНЫЙ
openstack server create --flavor 0 --image 41dc78dd-963d-4a84-a872-35d1d3cb3f7c --nic net-id=b4fb8e4a-cbbc-43e8-9e80-4abede8e4d56 --security-group 7f3af00c-f14f-469b-815f-2940733f36c1 --key-name mykey provider-instance
Также откройте порты брандмауэра 9292, чтобы служба была доступна