*** gtema has joined #openstack-ansible-sig | 04:07 | |
*** gtema has quit IRC | 04:11 | |
*** evrardjp has quit IRC | 04:33 | |
*** evrardjp has joined #openstack-ansible-sig | 04:33 | |
*** ysandeep|away is now known as ysandeep|rover | 05:03 | |
*** gtema has joined #openstack-ansible-sig | 06:04 | |
*** gtema has quit IRC | 06:09 | |
*** gtema has joined #openstack-ansible-sig | 06:34 | |
*** ysandeep|rover is now known as ysandeep|lunch | 07:52 | |
*** ysandeep|lunch is now known as ysandeep | 07:53 | |
*** ysandeep is now known as ysandeep|lunch | 07:53 | |
*** sshnaidm has joined #openstack-ansible-sig | 07:55 | |
*** iurygregory has quit IRC | 08:10 | |
*** iurygregory has joined #openstack-ansible-sig | 08:24 | |
*** ysandeep|lunch is now known as ysandeep|rover | 08:34 | |
*** dtantsur|afk is now known as dtantsur | 09:29 | |
*** ysandeep|rover is now known as ysandeep|afk | 10:42 | |
*** ysandeep|afk is now known as ysandeep|rover | 10:58 | |
*** gtema has quit IRC | 12:01 | |
*** zbr_ has quit IRC | 12:05 | |
*** gtema has joined #openstack-ansible-sig | 12:28 | |
*** ysandeep|rover is now known as ysandeep|afk | 12:37 | |
*** ysandeep|afk is now known as ysandeep | 12:58 | |
mordred | sshnaidm: ^^ that makes me have a thought ... we should write a custom logging handler that emits messages to the AnsibleModule self.log | 13:27 |
---|---|---|
mordred | which we can wire up in OpenStackModule | 13:27 |
mordred | so that logging messages from sdk can get naturally forwarded into the ansible logging infrastructure | 13:28 |
gtema | oh, I missed something what is terribly interesting | 13:28 |
gtema | I NEEEEEEDDDDD api logs from invoking ansible | 13:29 |
mordred | gtema: yah. I think it woudl actually be pretty easy to do | 13:29 |
gtema | reimplement zuul? | 13:29 |
mordred | we just need to make a handler: https://docs.python.org/3/library/logging.html#handler-objects that we'd instantiate in the OpenStackModule constructor (so that we could pass self in) | 13:30 |
mordred | and then do logging.addHandler(_this_new_handler) | 13:30 |
mordred | and have the handler have an emit method that either calls ansible_module.log or ansible_module.debug depending on what it gets | 13:31 |
gtema | ok | 13:31 |
gtema | wouldn't we get a problem of mixing too much data into the ansible output? | 13:31 |
gtema | and then we also need to be extremely careful about sensitive data which might be part of api requests | 13:32 |
sshnaidm | mordred, we do now "self.log" that calls ansible.log | 13:34 |
sshnaidm | https://github.com/openstack/ansible-collections-openstack/blob/master/plugins/module_utils/openstack.py#L262-L268 | 13:35 |
sshnaidm | if you mean this ^ | 13:35 |
gtema | no, SDK logs are not available here, until we register handler | 13:36 |
sshnaidm | oh, I see what you mean | 13:36 |
sshnaidm | not sure how I get them in the module though | 13:37 |
sshnaidm | is log handler in sdk configurable? | 13:37 |
mordred | very | 13:38 |
mordred | it uses python logging | 13:38 |
mordred | one sec | 13:38 |
mordred | example coming | 13:38 |
openstackgerrit | Monty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging https://review.opendev.org/740290 | 13:40 |
mordred | gtema, sshnaidm: something like that ^^ | 13:40 |
mordred | (needs a patch to sdk) | 13:40 |
gtema | yeah, seen it | 13:41 |
sshnaidm | yeah, that's what I meant - how do I pass handler to sdk | 13:41 |
mordred | that's all untested of course- mostly just sketching out what it can look like | 13:41 |
mordred | I mean - alternately we could just do logger = logging.getLogger('openstack') ; logger.addHandler(ansible_handler) - and not use the formatter from enable_logging | 13:42 |
mordred | but I think this will be cleaner in the log run | 13:42 |
gtema | agree | 13:43 |
mordred | need to figure out how to tell in the handler whether we're getting debug messages or not | 13:44 |
mordred | (we want to pass sdk debug messages to self.ansible.debug and other messages to self.ansible.log) | 13:44 |
gtema | yeah | 13:45 |
openstackgerrit | Monty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging https://review.opendev.org/740290 | 13:50 |
mordred | gtema: I think that should do it | 13:50 |
gtema | right, should do the job | 13:51 |
gtema | will try to test it out how it really works | 13:51 |
mordred | cool. and I hope that should only emit http tracing with -vvv | 13:53 |
openstackgerrit | Artem Goncharov proposed openstack/ansible-collections-openstack master: Add volume_backup module https://review.opendev.org/710093 | 14:11 |
openstackgerrit | Sagi Shnaidman proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging https://review.opendev.org/740290 | 14:18 |
openstackgerrit | Merged openstack/ansible-collections-openstack master: security_group_rule: use OpenStackModule class https://review.opendev.org/739095 | 14:24 |
openstackgerrit | Merged openstack/ansible-collections-openstack master: keypair: make use of OpenStackModule class https://review.opendev.org/739096 | 14:30 |
openstackgerrit | Merged openstack/ansible-collections-openstack master: Add openstack logger and Ansible display utility https://review.opendev.org/738595 | 14:30 |
*** gtema_ has joined #openstack-ansible-sig | 15:24 | |
*** gtema has quit IRC | 15:26 | |
*** ysandeep is now known as ysandeep|away | 15:30 | |
openstackgerrit | Monty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging https://review.opendev.org/740290 | 15:44 |
*** gtema_ has quit IRC | 16:29 | |
*** mwhahaha_ has joined #openstack-ansible-sig | 16:48 | |
*** mwhahaha has quit IRC | 16:55 | |
*** mordred has quit IRC | 16:55 | |
*** mwhahaha_ is now known as mwhahaha | 16:55 | |
*** mordred has joined #openstack-ansible-sig | 17:04 | |
*** gtema has joined #openstack-ansible-sig | 17:05 | |
*** gtema has quit IRC | 17:10 | |
*** sshnaidm is now known as sshnaidm|afk | 17:12 | |
*** dtantsur is now known as dtantsur|afk | 17:45 | |
*** EmilienM is now known as EmilienM|PTO | 18:38 | |
*** dmellado has quit IRC | 23:39 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!