shipyard/src/bin/shipyard_airflow/shipyard_airflow/plugins
Andrey Volkov 4164518502 Ensure pod logs are fetched in case of exception in any operator
This patch tries to cover some edge cases could happen during Shipyard
Airflow operator execution. All operators at the moment make
interactions with other services i.e. k8s pods. In a case of exceptions
during execution of the operator, logs will be fetched from the
appropriate pod and if the operator has "fetch_failure_details" method
(see DrydockBaseOperator) it will be called as well.

What exception could happen during an operator execution?
Besides explicitly defined in code like
DrydockClientUseFailureException, other exception e.g. KeyError or
similar may be raised. It's not clear who is a culprit in that client
side (Shipyard) or server side (Drydock, Armada, Deckhand,
Promenade). So this patch applies defensive mode and gets logs from
pods and gets additional details for any exceptional situations.

For doing that do_execute method is wrapped with try..except
in UcpBaseOperator.execute. While fetching logs from a pod
and fetching failure details it makes appropriate logging by itself
and finally reraises the original exception.

Change-Id: If1501e9a24b05edb6eb32c7b1b2d27f24f3ee063
2018-09-19 09:17:13 -07:00
..
__init__.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
armada_base_operator.py Add redeploy_server processing 2018-08-21 09:42:40 -05:00
armada_get_releases.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
armada_get_status.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
armada_post_apply.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
armada_validate_design.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
check_k8s_node_status.py Change k8s node status to be a positive check 2018-06-30 00:14:54 -05:00
check_k8s_pod_status.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
concurrency_check_operator.py Add udpate_software action to Shipyard 2018-07-06 16:57:42 -05:00
deckhand_base_operator.py Add redeploy_server processing 2018-08-21 09:42:40 -05:00
deckhand_client_factory.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
deckhand_create_site_action_tag.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
deckhand_retrieve_rendered_doc.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
deckhand_validate_site.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
deployment_configuration_operator.py Workflow to support deployment groups 2018-06-20 09:55:15 -05:00
drydock_base_operator.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
drydock_destroy_nodes.py Add redeploy_server processing 2018-08-21 09:42:40 -05:00
drydock_errors.py Workflow to support deployment groups 2018-06-20 09:55:15 -05:00
drydock_nodes.py [FIX] Serialization of Set failed 2018-09-12 11:32:19 -05:00
drydock_prepare_site.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
drydock_validate_design.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
drydock_verify_nodes.py Block site_update if there is no host in MaaS/Drydock 2018-09-12 14:13:28 -05:00
drydock_verify_site.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
get_k8s_logs.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
get_k8s_pod_port_ip.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
k8s_preflight_checks_operator.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
openstack_operators.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
placeholder_operator.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00
promenade_base_operator.py Add redeploy_server processing 2018-08-21 09:42:40 -05:00
promenade_check_etcd.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
promenade_clear_labels.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
promenade_decommission_node.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
promenade_drain_node.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
promenade_shutdown_kubelet.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
promenade_validate_site_design.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
service_endpoint.py Workflow to support deployment groups 2018-06-20 09:55:15 -05:00
service_session.py Workflow to support deployment groups 2018-06-20 09:55:15 -05:00
service_token.py Workflow to support deployment groups 2018-06-20 09:55:15 -05:00
ucp_base_operator.py Ensure pod logs are fetched in case of exception in any operator 2018-09-19 09:17:13 -07:00
ucp_preflight_check_operator.py Refactor imports to support loading dags for tests 2018-07-25 09:19:18 -05:00
xcom_puller.py Add redeploy_server processing 2018-08-21 09:42:40 -05:00
xcom_pusher.py Refactor shipyard to UCP target layout 2018-04-24 16:47:13 -05:00