-
-
Save cben/c9dec07b6551a5cd3e18ee65d46354d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MiqEvent.raise_evm_event(target, policy_event, inputs) | |
| event_obj = build_evm_event(event, target) | |
| pp event_obj | |
| #<MiqEvent:0x0055ac981f45b0 | |
| id: 1550, | |
| event_type: "containergroup_failedsync", | |
| message: nil, | |
| timestamp: Mon, 23 May 2016 10:26:45 UTC +00:00, | |
| host_name: nil, | |
| host_id: nil, | |
| vm_name: nil, | |
| vm_location: nil, | |
| vm_or_template_id: nil, | |
| dest_host_name: nil, | |
| dest_host_id: nil, | |
| dest_vm_name: nil, | |
| dest_vm_location: nil, | |
| dest_vm_or_template_id: nil, | |
| source: "POLICY", | |
| chain_id: nil, | |
| ems_id: nil, | |
| is_task: nil, | |
| full_data: nil, | |
| created_on: Mon, 23 May 2016 10:26:45 UTC +00:00, | |
| username: nil, | |
| ems_cluster_id: nil, | |
| ems_cluster_name: nil, | |
| ems_cluster_uid: nil, | |
| dest_ems_cluster_id: nil, | |
| dest_ems_cluster_name: nil, | |
| dest_ems_cluster_uid: nil, | |
| availability_zone_id: nil, | |
| container_node_id: nil, | |
| container_node_name: nil, | |
| container_group_id: nil, | |
| container_group_name: nil, | |
| container_namespace: nil, | |
| type: "MiqEvent", | |
| target_type: "ContainerGroup", | |
| target_id: 14, | |
| container_id: nil, | |
| container_name: nil, | |
| container_replicator_id: nil, | |
| container_replicator_name: nil, | |
| middleware_server_id: nil, | |
| middleware_server_name: nil, | |
| middleware_deployment_id: nil, | |
| middleware_deployment_name: nil> | |
| MiqAeEvent.raise_evm_event(raw_event, target, inputs, options) | |
| (byebug) raw_event | |
| "containergroup_failedsync" | |
| (byebug) target | |
| #<ManageIQ::Providers::Kubernetes::ContainerManager::ContainerGroup id: 14, ems_ref: "0a64d370-1d9d-11e6-b084-525400c7c086", name: "hawkular-cassandra-1-kepz6", ems_created_on: "2016-05-19 08:38:20", resource_version: "644580", restart_policy: "Always", dns_policy: "ClusterFirst", ems_id: 4, container_node_id: 6, last_perf_capture_on: nil, container_replicator_id: 12, ipaddress: "10.1.0.10", type: "ManageIQ::Providers::Kubernetes::ContainerManager:...", container_project_id: 12, phase: "Running", message: nil, reason: nil, container_build_pod_id: nil, created_on: "2016-05-23 08:41:42", deleted_on: nil, old_ems_id: nil, old_container_project_id: nil> | |
| (byebug) inputs | |
| {:ext_management_systems=>#<ManageIQ::Providers::Openshift::ContainerManager id: 4, name: "vm-test-02", created_on: "2016-05-23 08:41:40", updated_on: "2016-05-23 09:13:45", guid: "2b18f736-20c2-11e6-9b71-0242593b1833", zone_id: 2, type: "ManageIQ::Providers::Openshift::ContainerManager", api_version: nil, uid_ems: nil, host_default_vnc_port_start: nil, host_default_vnc_port_end: nil, provider_region: nil, last_refresh_error: nil, last_refresh_date: "2016-05-23 09:13:45", provider_id: nil, realm: nil, tenant_id: 2, project: nil, parent_ems_id: nil, subscription: nil>, :ems_event=>#<EmsEvent id: 211, event_type: "POD_FAILEDSYNC", message: "Error syncing pod, skipping: failed to \"StartConta...", timestamp: "2016-05-19 10:01:54", host_name: nil, host_id: nil, vm_name: nil, vm_location: nil, vm_or_template_id: nil, dest_host_name: nil, dest_host_id: nil, dest_vm_name: nil, dest_vm_location: nil, dest_vm_or_template_id: nil, source: "KUBERNETES", chain_id: nil, ems_id: 4, is_task: nil, full_data: {:timestamp=>"2016-05-19T10:01:54Z", :kind=>"Pod", :name=>"hawkular-cassandra-1-kepz6", :namespace=>"openshift-infra", :reason=>"FailedSync", :message=>"Error syncing pod, skipping: failed to \"StartContainer\" for \"hawkular-cassandra-1\" with CrashLoopBackOff: \"Back-off 5m0s restarting failed container=hawkular-cassandra-1 pod=hawkular-cassandra-1-kepz6_openshift-infra(0a64d370-1d9d-11e6-b084-525400c7c086)\"\n", :uid=>"0a64d370-1d9d-11e6-b084-525400c7c086", :event_type=>"POD_FAILEDSYNC", :container_group_name=>"hawkular-cassandra-1-kepz6", :container_namespace=>"openshift-infra"}, created_on: "2016-05-23 08:45:48", username: nil, ems_cluster_id: nil, ems_cluster_name: nil, ems_cluster_uid: nil, dest_ems_cluster_id: nil, dest_ems_cluster_name: nil, dest_ems_cluster_uid: nil, availability_zone_id: nil, container_node_id: nil, container_node_name: nil, container_group_id: 14, container_group_name: "hawkular-cassandra-1-kepz6", container_namespace: "openshift-infra", type: "EmsEvent", target_type: nil, target_id: nil, container_id: nil, container_name: nil, container_replicator_id: nil, container_replicator_name: nil, middleware_server_id: nil, middleware_server_name: nil, middleware_deployment_id: nil, middleware_deployment_name: nil>, "MiqEvent::miq_event"=>1550, :miq_event_id=>1550, "EventStream::event_stream"=>1550, :event_stream_id=>1550} | |
| (byebug) options | |
| {} | |
| => 41: call_automate(target, build_evm_event(event_name, inputs), 'Event', options) | |
| 113: def self.call_automate(obj, attrs, instance_name, options = {}) | |
| (byebug) obj | |
| #<ManageIQ::Providers::Kubernetes::ContainerManager::ContainerGroup id: 14, ems_ref: "0a64d370-1d9d-11e6-b084-525400c7c086", name: "hawkular-cassandra-1-kepz6", ems_created_on: "2016-05-19 08:38:20", resource_version: "644580", restart_policy: "Always", dns_policy: "ClusterFirst", ems_id: 4, container_node_id: 6, last_perf_capture_on: nil, container_replicator_id: 12, ipaddress: "10.1.0.10", type: "ManageIQ::Providers::Kubernetes::ContainerManager:...", container_project_id: 12, phase: "Running", message: nil, reason: nil, container_build_pod_id: nil, created_on: "2016-05-23 08:41:42", deleted_on: nil, old_ems_id: nil, old_container_project_id: nil> | |
| (byebug) attrs | |
| {:event_type=>"containergroup_failedsync", | |
| :ext_management_systems=> | |
| #<ManageIQ::Providers::Openshift::ContainerManager:0x0055ac8ca61358 | |
| id: 4, | |
| name: "vm-test-02", | |
| created_on: Mon, 23 May 2016 08:41:40 UTC +00:00, | |
| updated_on: Mon, 23 May 2016 09:13:45 UTC +00:00, | |
| guid: "2b18f736-20c2-11e6-9b71-0242593b1833", | |
| zone_id: 2, | |
| type: "ManageIQ::Providers::Openshift::ContainerManager", | |
| api_version: nil, | |
| uid_ems: nil, | |
| host_default_vnc_port_start: nil, | |
| host_default_vnc_port_end: nil, | |
| provider_region: nil, | |
| last_refresh_error: nil, | |
| last_refresh_date: Mon, 23 May 2016 09:13:45 UTC +00:00, | |
| provider_id: nil, | |
| realm: nil, | |
| tenant_id: 2, | |
| project: nil, | |
| parent_ems_id: nil, | |
| subscription: nil>, | |
| :ems_event=> | |
| #<EmsEvent:0x0055ac8b6f03a0 | |
| id: 211, | |
| event_type: "POD_FAILEDSYNC", | |
| message: | |
| "Error syncing pod, skipping: failed to \"StartContainer\" for \"hawkular-cassandra-1\" with CrashLoopBackOff: \"Back-off 5m0s restarting failed container=hawkular-cassandra-1 pod=hawkular-cassandra-1-kepz6_openshift-infra(0a64d370-1d9d-11e6-b084-525400c7c086)\"\n", | |
| timestamp: Thu, 19 May 2016 10:01:54 UTC +00:00, | |
| host_name: nil, | |
| host_id: nil, | |
| vm_name: nil, | |
| vm_location: nil, | |
| vm_or_template_id: nil, | |
| dest_host_name: nil, | |
| dest_host_id: nil, | |
| dest_vm_name: nil, | |
| dest_vm_location: nil, | |
| dest_vm_or_template_id: nil, | |
| source: "KUBERNETES", | |
| chain_id: nil, | |
| ems_id: 4, | |
| is_task: nil, | |
| full_data: | |
| {:timestamp=>"2016-05-19T10:01:54Z", | |
| :kind=>"Pod", | |
| :name=>"hawkular-cassandra-1-kepz6", | |
| :namespace=>"openshift-infra", | |
| :reason=>"FailedSync", | |
| :message=> | |
| "Error syncing pod, skipping: failed to \"StartContainer\" for \"hawkular-cassandra-1\" with CrashLoopBackOff: \"Back-off 5m0s restarting failed container=hawkular-cassandra-1 pod=hawkular-cassandra-1-kepz6_openshift-infra(0a64d370-1d9d-11e6-b084-525400c7c086)\"\n", | |
| :uid=>"0a64d370-1d9d-11e6-b084-525400c7c086", | |
| :event_type=>"POD_FAILEDSYNC", | |
| :container_group_name=>"hawkular-cassandra-1-kepz6", | |
| :container_namespace=>"openshift-infra"}, | |
| created_on: Mon, 23 May 2016 08:45:48 UTC +00:00, | |
| username: nil, | |
| ems_cluster_id: nil, | |
| ems_cluster_name: nil, | |
| ems_cluster_uid: nil, | |
| dest_ems_cluster_id: nil, | |
| dest_ems_cluster_name: nil, | |
| dest_ems_cluster_uid: nil, | |
| availability_zone_id: nil, | |
| container_node_id: nil, | |
| container_node_name: nil, | |
| container_group_id: 14, | |
| container_group_name: "hawkular-cassandra-1-kepz6", | |
| container_namespace: "openshift-infra", | |
| type: "EmsEvent", | |
| target_type: nil, | |
| target_id: nil, | |
| container_id: nil, | |
| container_name: nil, | |
| container_replicator_id: nil, | |
| container_replicator_name: nil, | |
| middleware_server_id: nil, | |
| middleware_server_name: nil, | |
| middleware_deployment_id: nil, | |
| middleware_deployment_name: nil>, | |
| "MiqEvent::miq_event"=>1550, | |
| :miq_event_id=>1550, | |
| "EventStream::event_stream"=>1550, | |
| :event_stream_id=>1550} | |
| (byebug) instance_name | |
| "Event" | |
| (byebug) options | |
| {} | |
| [109, 118] in /home/bpaskinc/miq/events/lib/miq_automation_engine/engine/miq_ae_event.rb | |
| 113: def self.call_automate(obj, attrs, instance_name, options = {}) | |
| => 114: user = obj.tenant_identity | |
| 428: def method_missing(method, *args, &block) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| After implementing tenant_identity: | |
| In MiqAeEvent.call_automate: | |
| user is admin [https://github.com/ManageIQ/manageiq/pull/8815/commits/5f0281dc5c85d71c7193aca5ad76228413a3b608#r64212313] | |
| {:object_type=> | |
| "ManageIQ::Providers::Kubernetes::ContainerManager::ContainerGroup", | |
| :object_id=>20, | |
| :attrs=> | |
| {:event_type=>"containergroup_failedsync", | |
| :ext_management_systems=> | |
| #<ManageIQ::Providers::Openshift::ContainerManager:0x0055812eba04f0 | |
| id: 4, | |
| name: "vm-test-02", | |
| created_on: Mon, 23 May 2016 08:41:40 UTC +00:00, | |
| updated_on: Mon, 23 May 2016 12:12:12 UTC +00:00, | |
| guid: "2b18f736-20c2-11e6-9b71-0242593b1833", | |
| zone_id: 2, | |
| type: "ManageIQ::Providers::Openshift::ContainerManager", | |
| api_version: nil, | |
| uid_ems: nil, | |
| host_default_vnc_port_start: nil, | |
| host_default_vnc_port_end: nil, | |
| provider_region: nil, | |
| last_refresh_error: nil, | |
| last_refresh_date: Mon, 23 May 2016 12:12:12 UTC +00:00, | |
| provider_id: nil, | |
| realm: nil, | |
| tenant_id: 2, | |
| project: nil, | |
| parent_ems_id: nil, | |
| subscription: nil>, | |
| :ems_event=> | |
| #<EmsEvent:0x0055812e584260 | |
| id: 286, | |
| event_type: "POD_FAILEDSYNC", | |
| message: | |
| "Error syncing pod, skipping: failed to \"StartContainer\" for \"cakephp-ex\" with ImagePullBackOff: \"Back-off pulling image \\\"172.30.29.183:5000/proj2/cakephp-ex@sha256:c0cc66694f5a7c3afe9a6e5100ad5265fc89a34f03486a050609139643948e50\\\"\"\n", | |
| timestamp: Thu, 19 May 2016 10:07:35 UTC +00:00, | |
| host_name: nil, | |
| host_id: nil, | |
| vm_name: nil, | |
| vm_location: nil, | |
| vm_or_template_id: nil, | |
| dest_host_name: nil, | |
| dest_host_id: nil, | |
| dest_vm_name: nil, | |
| dest_vm_location: nil, | |
| dest_vm_or_template_id: nil, | |
| source: "KUBERNETES", | |
| chain_id: nil, | |
| ems_id: 4, | |
| is_task: nil, | |
| full_data: | |
| {:timestamp=>"2016-05-19T10:07:35Z", | |
| :kind=>"Pod", | |
| :name=>"cakephp-ex-1-krjwk", | |
| :namespace=>"proj2", | |
| :reason=>"FailedSync", | |
| :message=> | |
| "Error syncing pod, skipping: failed to \"StartContainer\" for \"cakephp-ex\" with ImagePullBackOff: \"Back-off pulling image \\\"172.30.29.183:5000/proj2/cakephp-ex@sha256:c0cc66694f5a7c3afe9a6e5100ad5265fc89a34f03486a050609139643948e50\\\"\"\n", | |
| :uid=>"2126aa99-1da1-11e6-b084-525400c7c086", | |
| :event_type=>"POD_FAILEDSYNC", | |
| :container_group_name=>"cakephp-ex-1-krjwk", | |
| :container_namespace=>"proj2"}, | |
| created_on: Mon, 23 May 2016 08:51:26 UTC +00:00, | |
| username: nil, | |
| ems_cluster_id: nil, | |
| ems_cluster_name: nil, | |
| ems_cluster_uid: nil, | |
| dest_ems_cluster_id: nil, | |
| dest_ems_cluster_name: nil, | |
| dest_ems_cluster_uid: nil, | |
| availability_zone_id: nil, | |
| container_node_id: nil, | |
| container_node_name: nil, | |
| container_group_id: 20, | |
| container_group_name: "cakephp-ex-1-krjwk", | |
| container_namespace: "proj2", | |
| type: "EmsEvent", | |
| target_type: nil, | |
| target_id: nil, | |
| container_id: nil, | |
| container_name: nil, | |
| container_replicator_id: nil, | |
| container_replicator_name: nil, | |
| middleware_server_id: nil, | |
| middleware_server_name: nil, | |
| middleware_deployment_id: nil, | |
| middleware_deployment_name: nil>, | |
| "MiqEvent::miq_event"=>2348, | |
| :miq_event_id=>2348, | |
| "EventStream::event_stream"=>2348, | |
| :event_stream_id=>2348}, | |
| :instance_name=>"Event", | |
| :user_id=>3, | |
| :miq_group_id=>17, | |
| :tenant_id=>2, | |
| :automate_message=>nil} | |
| => 138: MiqAeEngine.deliver_queue(args, q_options) | |
| which goes into some dirty internals and I stopped stepping... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment