Show complete workflow when provisioning an instance

Bug #1359722 reported by Anne Gentle
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Wishlist
Darren Chan

Bug Description

I'd like to document an end-to-end flow of provisioning an instance on OpenStack Havana. I think this kind a sequence diagram helps to understand how OpenStack works and how many components has to co-operate to get a VM created.
Copy/paste the text below into https://www.websequencediagrams.com/ to see it

title Provision Instance

Client->+Keystone: Authentication Request
Keystone->+LDAP: authn
LDAP-->-Keystone:
Keystone->+Token Store:Save token
Token Store-->-Keystone:
Keystone-->-Client: Auth token

Client->+Nova-api: launch instance

Nova-api->DB: Create initial entry for instance
Nova-api->MQ: [rpc.cast] to request new instance
Nova-api->-Client:Instance request complete

Nova-scheduler->MQ: Subcribe new instance request
Nova-scheduler->DB: read filtering and weighing info
Nova-scheduler->DB: Read cluster state
Nova-scheduler->DB: Save instance state
Nova-scheduler->MQ: rpc.cast to launch instance

Nova-compute->MQ: Subcribe new instance request
Nova-compute->MQ: rpc.call to Nova-conductor to fetch the instance info
Nova-conductor->MQ: Subcribe new instance request
Nova-conductor->DB: Read instance state
Nova-conductor->MQ: Publish new instance state

Nova-compute->MQ: Subcribe new instance request

Nova-compute->+Glance-api: REST get Image URI by Image ID from glance
Glance-api->-Nova-compute: Return image URI

Nova-compute->+ceph_mon: get cluster map
ceph_mon->-Nova-compute: return map

Nova-compute->+ceph_rgw: [REST] request object
ceph_rgw->ceph_osd: [socket] get object
ceph_rgw->-Nova-compute: return object

Nova-compute->+Neutron-server: allocate and configure the network for instance
Neutron-server->MQ: Request IP
Neutron-server->MQ: Request L2 config

Neutron-DHCP-agent->MQ: read Request IP
Neutron-DHCP-agent->dnsmasq: allocate IP
dnsmasq->Neutron-DHCP-agent: reply
Neutron-DHCP-agent->MQ: reply IP

Neutron-server->MQ:read IP
Neutron-L2-agent->MQ: read Request L2 config
Neutron-L2-agent->libvirt: config L2
Neutron-L2-agent->MQ: reply L2 config
Neutron-server->DB: save instance network state
Neutron-server->-Nova-compute: Pass network info

Nova-compute->Cinder-api: [REST] get volume data
Cinder-api->+Keystone: Validate token & permissions
Keystone-->-Cinder-api: updated auth headers with roles and acl
Cinder-api->Nova-compute: return volume info

Nova-compute->libvirt: Start VM
Nova-compute->libvirt: Port_update

Nova-compute->MQ: rpc.call to Nova-conductor to fetch the instance info
Nova-conductor->MQ: Subcribe new instance request
Nova-conductor->MQ: Publish new instance state

Nova-compute->libvirt: pass volume info
libvirt->+ceph_mon: get cluster map
ceph_mon->-libvirt: return map
libvirt->ceph_osd: mount volume

VM-instance->+neutron_metadata_proxy: http rest 169.254.169.254
neutron_metadata_proxy->nova-api-metadata: http rest add uuid into X-headers
nova-api-metadata->neutron_metadata_proxy:
neutron_metadata_proxy->-VM-instance: return metadata

Client->+Nova-api: Poll instance state
Nova-api->+DB: Read instance state
DB->-Nova-api: Return state
Nova-api->-Client: Return instance state

Revision history for this message
Anne Gentle (annegentle) wrote :

I think this diagram makes sense in the Ops Guide perhaps or the User Guide to assist with troubleshooting.

Revision history for this message
Anne Gentle (annegentle) wrote :

Probably need to take the ceph reference out. Ari, do you know if cinder can be substituted there?

Changed in openstack-manuals:
assignee: nobody → Priti Desai (priti-desai)
Revision history for this message
Ari Flink (flinkster) wrote :

Anne, we can take Ceph specifics out and replace it with cinder.

Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: Confirmed → Triaged
Revision history for this message
Badri (badri-natarajan) wrote :

Hello folks -

Would it be possible for someone to tell if the provisioning sequence mentioned above has changed from the Havana to the Icehouse/Juno releases ? Is it mostly still the same in the later releases as well?

Thanks.

Revision history for this message
Anne Gentle (annegentle) wrote :

This came in through email to me, asking for help with ensuring the workflow is accurate. So I think to work on this bug you'll have to go through the provisioning steps in the nova code itself, sorry. I don't know of another way to ensure the accuracy in a release. there is a post here: https://software.intel.com/en-us/articles/physical-server-provisioning-with-openstack that may help you get started.

Revision history for this message
Anne Gentle (annegentle) wrote :

Also came through in email.

-----
What does the following exchange stand for ?

##############
Nova-compute->+ceph_mon: get cluster map
ceph_mon->-Nova-compute: return map

Nova-compute->+ceph_rgw: [REST] request object
ceph_rgw->ceph_osd: [socket] get object
ceph_rgw->-Nova-compute: return object
##############

https://www.websequencediagrams.com/ is a choice though. Actually, we
can't see anything without paying 10$-15$. Ugh.

--------------------

Revision history for this message
Romil Gupta (romilg) wrote :
Changed in openstack-manuals:
assignee: Priti Desai (priti-desai) → nobody
Revision history for this message
Masaki Furuta (masaki-furuta) wrote :
Download full text (3.4 KiB)

Hi,

I've converted syntax for http://plantuml.com/ , please check if it works for you.

Client->Keystone: Authentication Request
Activate Keystone
Keystone->LDAP: authn
Activate LDAP
Keystone<--LDAP:
Deactivate LDAP
Keystone->"Token Store": Save token
Activate "Token Store"
Keystone<--"Token Store"
Deactivate "Token Store"
Keystone-->Client: Auth token
Deactivate Keystone

Client->"Nova-api": launch instance
Activate "Nova-api"
"Nova-api"->DB: Create initial entry for instance
"Nova-api"->MQ: [rpc.cast] to request new instance
"Nova-api"->Client:Instance request complete
Deactivate "Nova-api"

"Nova-Scheduler"->MQ: Subcribe new instance request
"Nova-Scheduler"->DB: read filtering and weighing info
"Nova-Scheduler"->DB: Read cluster state
"Nova-Scheduler"->DB: Save instance state
"Nova-Scheduler"->MQ: rpc.cast to launch instance

"Nova-compute"->MQ: Subcribe new instance request
"Nova-compute"->MQ: rpc.call to Nova-conductor to fetch the instance info
"Nova-conductor"->MQ: Subcribe new instance request
"Nova-conductor"->DB: Read instance state
"Nova-conductor"->MQ: Publish new instance state

"Nova-compute"->MQ: Subcribe new instance request
"Nova-compute"->"Glance-api": REST get Image URI by Image ID from glance
Activate "Glance-api"
"Glance-api"->"Nova-compute": Return image URI
Deactivate "Glance-api"

"Nova-compute"->ceph_mon: get cluster map
Activate "ceph_mon"
ceph_mon->"Nova-compute": return map
Deactivate "ceph_mon"

"Nova-compute"->ceph_rgw: [REST] request object
Activate "ceph_rgw"
ceph_rgw->ceph_osd: [socket] get object
ceph_rgw->"Nova-compute": return object
Deactivate "ceph_rgw"

"Nova-compute"->"Neutron-server": allocate and configure the network for instance
Activate "Neutron-server"
"Neutron-server"->MQ: Request IP
"Neutron-server"->MQ: Request L2 config

"Neutron-DHCP-agent"->MQ: read Request IP
"Neutron-DHCP-agent"->dnsmasq: allocate IP
dnsmasq->"Neutron-DHCP-agent": reply
"Neutron-DHCP-agent"->MQ: reply IP

"Neutron-server"->MQ:read IP
"Neutron-L2-agent"->MQ: read Request L2 config
"Neutron-L2-agent"->libvirt: config L2
"Neutron-L2-agent"->MQ: reply L2 config
"Neutron-server"->DB: save instance network state
"Neutron-server"->"Nova-compute": Pass network info
Deactivate "Neutron-server"

"Nova-compute"->"Cinder-api": [REST] get volume data
"Cinder-api"->Keystone: Validate token & permissions
Activate "Keystone"
"Cinder-api"<--Keystone: updated auth headers with roles and acl
Deactivate "Keystone"
"Cinder-api"->"Nova-compute": return volume info

"Nova-compute"->libvirt: Start VM
"Nova-compute"->libvirt: Port_update

"Nova-compute"->MQ: rpc.call to Nova-conductor to fetch the instance info
"Nova-conductor"->MQ: Subcribe new instance request
"Nova-conductor"->MQ: Publish new instance state

"Nova-compute"->libvirt: pass volume info
libvirt->ceph_mon: get cluster map
Activate "ceph_mon"
ceph_mon->libvirt: return map
Deactivate "ceph_mon"
libvirt->ceph_osd: mount volume

"VM-instance"->neutron_metadata_proxy: http rest 169.254.169.254
Activate neutron_metadata_proxy
neutron_metadata_proxy->"nova-api-metadata": http rest add uuid into X-headers
"nova-api-metadata"->neutron_metadata_proxy:
neutron_metadata_proxy->"VM-instanc...

Read more...

Revision history for this message
Basil Baby (basilbaby) wrote :

Trying to understand it better, what is the "Nova-scheduler->DB: Read cluster state" ?

Changed in openstack-manuals:
assignee: nobody → Darren Chan (dazzachan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

Fix proposed to branch: master
Review: https://review.openstack.org/351504

Changed in openstack-manuals:
status: Triaged → In Progress
Changed in openstack-manuals:
assignee: Darren Chan (dazzachan) → Alexandra Settle (alexandra-settle)
Changed in openstack-manuals:
assignee: Alexandra Settle (alexandra-settle) → Darren Chan (dazzachan)
Changed in openstack-manuals:
assignee: Darren Chan (dazzachan) → ologvinova (ologvinova)
Changed in openstack-manuals:
assignee: ologvinova (ologvinova) → Darren Chan (dazzachan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/351504
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=0703b973f91931e7d4ca7f2b88a57a6378bc54a3
Submitter: Jenkins
Branch: master

commit 0703b973f91931e7d4ca7f2b88a57a6378bc54a3
Author: daz <email address hidden>
Date: Fri Aug 5 16:19:22 2016 +1000

    [ops-guide] provision an instance

    Add sequence diagram and description of the end-to-end flow
    of provisioning an instance on OpenStack.

    Change-Id: I56c09a219eb05e3fb421f16fd009437a4097a665
    Closes-bug: #1359722

Changed in openstack-manuals:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-manuals 15.0.0

This issue was fixed in the openstack/openstack-manuals 15.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.