Skip to content

Nova and Placement specific information gathering #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion collection-scripts/gather_services_status
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ get_status() {
"heat")
get_heat_status
;;
"nova")
get_nova_status
;;
"placement")
get_placement_status
;;
*) ;;
esac
}
Expand All @@ -40,7 +46,6 @@ get_openstack_status() {
mkdir -p "$BASE_COLLECTION_PATH"/ctlplane
run_bg ${BASH_ALIASES[os]} endpoint list '>' "$BASE_COLLECTION_PATH"/ctlplane/endpoints
run_bg ${BASH_ALIASES[os]} service list '>' "$BASE_COLLECTION_PATH"/ctlplane/services
run_bg ${BASH_ALIASES[os]} compute service list '>' "$BASE_COLLECTION_PATH"/ctlplane/compute_service_list
run_bg ${BASH_ALIASES[os]} network agent list '>' "$BASE_COLLECTION_PATH"/ctlplane/network_agent_list
}

Expand Down Expand Up @@ -87,6 +92,29 @@ get_heat_status() {
${BASH_ALIASES[os]} orchestration service list > "$HEAT_PATH"/service_list
}

# Nova service gathering - sevices, hypervisors, cells, host mappings, allocation audit
get_nova_status() {
local NOVA_PATH="$BASE_COLLECTION_PATH/ctlplane/nova"
mkdir -p "$NOVA_PATH"
run_bg ${BASH_ALIASES[os]} compute service list '>' "$NOVA_PATH"/service_list

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i know your following the exisitn pattern but ideally

"$NOVA_PATH"/service_list would be "${NOVA_PATH}/service_list"

run_bg ${BASH_ALIASES[os]} hypervisor list '>' "$NOVA_PATH"/hypervisor_list
run_bg /usr/bin/oc -n openstack exec -t nova-cell0-conductor-0 -- nova-manage cell_v2 list_cells '>' "$NOVA_PATH"/cell_list
run_bg /usr/bin/oc -n openstack exec -t nova-cell0-conductor-0 -- nova-manage cell_v2 list_hosts '>' "$NOVA_PATH"/host_list
run_bg ${BASH_ALIASES[os]} aggregate list --long '>' "$NOVA_PATH"/aggregate_list
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still think it would be nice to include a flavour detail list output
other then that i think this is a good start so I'm ok with differing that to a spereate pr.


# Placement service gathering - capacity overview
get_placement_status() {
local PLACEMENT_PATH="$BASE_COLLECTION_PATH/ctlplane/placement"
mkdir -p "$PLACEMENT_PATH"
# NOTE(gibi): this gives us a very simple resource capacity view of the
# cluster. It is intentionally uses 1 MB RAM query to get one candidate
# from each compute
run_bg ${BASH_ALIASES[os]} allocation candidate list --resource MEMORY_MB=1 --max-width 200 -c "'resource provider'" -c "'inventory used/capacity'" -c "traits" '>' "$PLACEMENT_PATH"/allocation_candidate_list
run_bg ${BASH_ALIASES[os]} resource class list '>' "$PLACEMENT_PATH"/resource_class_list
run_bg ${BASH_ALIASES[os]} trait list '>' "$PLACEMENT_PATH"/trait_list
}

# first we gather generic status of the openstack ctlplane
# then we process the existing services (if an associated
# function has been defined)
Expand Down