Thursday, 2020-07-09

*** gtema has joined #openstack-ansible-sig04:07
*** gtema has quit IRC04:11
*** evrardjp has quit IRC04:33
*** evrardjp has joined #openstack-ansible-sig04:33
*** ysandeep|away is now known as ysandeep|rover05:03
*** gtema has joined #openstack-ansible-sig06:04
*** gtema has quit IRC06:09
*** gtema has joined #openstack-ansible-sig06:34
*** ysandeep|rover is now known as ysandeep|lunch07:52
*** ysandeep|lunch is now known as ysandeep07:53
*** ysandeep is now known as ysandeep|lunch07:53
*** sshnaidm has joined #openstack-ansible-sig07:55
*** iurygregory has quit IRC08:10
*** iurygregory has joined #openstack-ansible-sig08:24
*** ysandeep|lunch is now known as ysandeep|rover08:34
*** dtantsur|afk is now known as dtantsur09:29
*** ysandeep|rover is now known as ysandeep|afk10:42
*** ysandeep|afk is now known as ysandeep|rover10:58
*** gtema has quit IRC12:01
*** zbr_ has quit IRC12:05
*** gtema has joined #openstack-ansible-sig12:28
*** ysandeep|rover is now known as ysandeep|afk12:37
*** ysandeep|afk is now known as ysandeep12:58
mordredsshnaidm: ^^ that makes me have a thought ... we should write a custom logging handler that emits messages to the AnsibleModule self.log13:27
mordredwhich we can wire up in OpenStackModule13:27
mordredso that logging messages from sdk can get naturally forwarded into the ansible logging infrastructure13:28
gtemaoh, I missed something what is terribly interesting13:28
gtemaI NEEEEEEDDDDD api logs from invoking ansible13:29
mordredgtema: yah. I think it woudl actually be pretty easy to do13:29
gtemareimplement zuul?13:29
mordredwe 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
mordredand then do logging.addHandler(_this_new_handler)13:30
mordredand have the handler have an emit method that either calls ansible_module.log or ansible_module.debug depending on what it gets13:31
gtemaok13:31
gtemawouldn't we get a problem of mixing too much data into the ansible output?13:31
gtemaand then we also need to be extremely careful about sensitive data which might be part of api requests13:32
sshnaidmmordred, we do now "self.log" that calls ansible.log13:34
sshnaidmhttps://github.com/openstack/ansible-collections-openstack/blob/master/plugins/module_utils/openstack.py#L262-L26813:35
sshnaidmif you mean this ^13:35
gtemano, SDK logs are not available here, until we register handler13:36
sshnaidmoh, I see what you mean13:36
sshnaidmnot sure how I get them in the module though13:37
sshnaidmis log handler in sdk configurable?13:37
mordredvery13:38
mordredit uses python logging13:38
mordredone sec13:38
mordredexample coming13:38
openstackgerritMonty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging  https://review.opendev.org/74029013:40
mordredgtema, sshnaidm: something like that ^^13:40
mordred(needs a patch to sdk)13:40
gtemayeah, seen it13:41
sshnaidmyeah, that's what I meant - how do I pass handler to sdk13:41
mordredthat's all untested of course- mostly just sketching out what it can look like13:41
mordredI mean - alternately we could just do logger = logging.getLogger('openstack') ; logger.addHandler(ansible_handler) - and not use the formatter from enable_logging13:42
mordredbut I think this will be cleaner in the log run13:42
gtemaagree13:43
mordredneed to figure out how to tell in the handler whether we're getting debug messages or not13:44
mordred(we want to pass sdk debug messages to self.ansible.debug and other messages to self.ansible.log)13:44
gtemayeah13:45
openstackgerritMonty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging  https://review.opendev.org/74029013:50
mordredgtema: I think that should do it13:50
gtemaright, should do the job13:51
gtemawill try to test it out how it really works13:51
mordredcool. and I hope that should only emit http tracing with -vvv13:53
openstackgerritArtem Goncharov proposed openstack/ansible-collections-openstack master: Add volume_backup module  https://review.opendev.org/71009314:11
openstackgerritSagi Shnaidman proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging  https://review.opendev.org/74029014:18
openstackgerritMerged openstack/ansible-collections-openstack master: security_group_rule: use OpenStackModule class  https://review.opendev.org/73909514:24
openstackgerritMerged openstack/ansible-collections-openstack master: keypair: make use of OpenStackModule class  https://review.opendev.org/73909614:30
openstackgerritMerged openstack/ansible-collections-openstack master: Add openstack logger and Ansible display utility  https://review.opendev.org/73859514:30
*** gtema_ has joined #openstack-ansible-sig15:24
*** gtema has quit IRC15:26
*** ysandeep is now known as ysandeep|away15:30
openstackgerritMonty Taylor proposed openstack/ansible-collections-openstack master: WIP Log openstacksdk logging to ansible logging  https://review.opendev.org/74029015:44
*** gtema_ has quit IRC16:29
*** mwhahaha_ has joined #openstack-ansible-sig16:48
*** mwhahaha has quit IRC16:55
*** mordred has quit IRC16:55
*** mwhahaha_ is now known as mwhahaha16:55
*** mordred has joined #openstack-ansible-sig17:04
*** gtema has joined #openstack-ansible-sig17:05
*** gtema has quit IRC17:10
*** sshnaidm is now known as sshnaidm|afk17:12
*** dtantsur is now known as dtantsur|afk17:45
*** EmilienM is now known as EmilienM|PTO18:38
*** dmellado has quit IRC23:39

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!