Wednesday, 2025-03-26

jneo8Hi Watcher team,... (full message at <https://matrix.org/oftc/media/v1/media/download/AQxrMkw85N8c6ZKVAsJ8Px-MmM710lKoMpxlg8Yllka8COq2Fvi2QU-i7CIcrDTQXZSNmeXzcVWy3dx-dJGLoEJCeWGFIm8QAG1hdHJpeC5vcmcvcXl1TllleWxkWWRrUWlBQ2lLY1lHb2F5>)02:12
sean-k-mooneyjneo8: it currently how its desgined yes, one thing that may be able to help is using nova notificatoin with watcher. watcher has the ablity to consome notificaiton but i have not had time to see if they cna be used today to refresh the cache03:50
jneo8I see, can I open an issue as follow up and we can discuss there?03:51
sean-k-mooneyam sure. the default interval is 1 hour. we are overriedign that in our downstream to i think 15mins initally until we get some expricne with the load that cretes03:54
sean-k-mooneyya i set them to 900 seconds https://github.com/openstack-k8s-operators/watcher-operator/blob/main/templates/00-default.conf#L104-L11103:55
sean-k-mooneyin ci we reduce ti 120 second but i dont think that would be reasonable to production03:55
sean-k-mooneyjneo8: its defintly on of the design choices that we need to revisit03:56
sean-k-mooneyjneo8: this is the current notifcaiotn code https://github.com/openstack/watcher/blob/035e6584c78e2b23a3afef8aaa1ff7696ab9f684/watcher/decision_engine/model/notification/nova.py#L252-L36304:00
sean-k-mooneythat should update the chaced model when instnace are migrated and services are disabled04:01
sean-k-mooneybut only if you have enabel notifcaions in nova and configure watcher to consume them04:01
sean-k-mooneyi have nto had time to audit that code to ensure it still works however04:03
sean-k-mooneyjneo8: that shoudl do what you want in theory by updating the cache as the move operations complete rather then waiting for the perodic to run04:04
jneo8Thanks sean, very helpful instruction.05:39
jneo8I open an [issue](https://bugs.launchpad.net/watcher/+bug/2104220) as follow up.05:39
opendevreviewJoan F Gilabert proposed openstack/watcher master: Set number of decimal digits in efficacy indicator  https://review.opendev.org/c/openstack/watcher/+/94519909:45
opendevreviewJoan F Gilabert proposed openstack/watcher master: Set number of decimal digits in efficacy indicator  https://review.opendev.org/c/openstack/watcher/+/94519910:36
sean-k-mooneyjneo8: another option would be to tweak the action plan to flush or refersh the cache as part of the actions performed by the audit11:56
sean-k-mooneyjneo8: i.e. trigger a selective refresh of the affected instances/hosts after the action plan is completed11:57
opendevreviewchandan kumar proposed openstack/watcher-tempest-plugin master: Add deprecation about client_functional tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94313312:44
chandankumarsean-k-mooney: Hello, I need some help to add deprecation message in the watcher tempest plugin functional tests on this cr https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/943133 , I have added it but it does not appear during functional tempest test execution, please have a look, when free, thank you!13:15
sean-k-mooneyack13:16
sean-k-mooneyi wonder if it has somethign to do with our default log config13:16
sean-k-mooneythis uses the default warning framework in python instead of the logging module13:17
sean-k-mooneywe may now be redirecting that to the same location by default13:17
chandankumarsean-k-mooney: you mean tempest.conf default logging?13:23
chandankumardefault_log_levels             = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN', 'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO', 'oslo.messaging=INFO', 'oslo_messaging=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool=WARN', 'urllib3.connectionpool=WARN', 'websocket=WARN', 'requests.packages.urllib3.util.retry=WARN', 'urllib3.util.retry=WARN', 'keystonemiddleware=WARN', 'routes.middleware=WARN', 'stevedore=WARN', 'taskflow=WARN'13:23
chandankumar'keystoneauth=WARN', 'oslo.cache=INFO', 'oslo_policy=INFO', 'dogpile.core.dogpile=INFO'] 13:23
chandankumarfrom tempest.conf https://a3fd8c27c0382f01ec6b-02618f010e74d581319c83aa0d27e1a8.ssl.cf5.rackcdn.com/openstack/bbed1a09d95b4bf591525cfe939536d6/controller/logs/tempest_log.txt13:23
sean-k-mooneyno not tempest. this is the service log config13:24
sean-k-mooneywell13:24
sean-k-mooneyactully its the plugin13:24
sean-k-mooneyso ya i guess it would be tempst13:25
sean-k-mooneyit proably would be good to ask about this in #openstack-qa13:25
chandankumarsure13:25
sean-k-mooneyif we look at https://docs.openstack.org/debtcollector/latest/user/usage.html#removing-a-class-classmethod-method-function13:28
sean-k-mooneywe likely need to add import warnings13:28
sean-k-mooneywarnings.simplefilter("once")13:28
opendevreviewAlfredo Moralejo proposed openstack/watcher-tempest-plugin master: Check expected actions included in plans when executing strategies  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94523313:28
sean-k-mooneyi dont think python warnings are logged by default13:29
sean-k-mooneyah we can also do it via https://docs.python.org/3/library/logging.html#logging.captureWarnings13:30
sean-k-mooneyso what we actully want to do is call logging.captureWarnings(True)13:30
opendevreviewAlfredo Moralejo proposed openstack/watcher-tempest-plugin master: Ensure test_execute_workload_stabilization_strategy creates non-emtpy action nplan  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94532513:32
chandankumarok, let me try with logging.capturewarning13:32
sean-k-mooneywe do that in many but not all projects  the rest use warnings.simplefilter so i think either is fine13:33
sean-k-mooneywarnings.simplefilter allwos you to trun on some but not all warnings 13:34
sean-k-mooneyso you can do  warnings.simplefilter('once', DeprecationWarning)13:34
sean-k-mooneythat might be cleaner13:34
sean-k-mooneyhttps://opendev.org/openstack/nova/src/branch/master/nova/tests/fixtures/nova.py#L82113:35
sean-k-mooneyby using the warning filters we can contole what prints and what does not with more granularity13:36
opendevreviewchandan kumar proposed openstack/watcher-tempest-plugin master: Add deprecation about client_functional tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94313313:43
chandankumarsure, let me try that 13:43
sean-k-mooneyyou still need to bring DeprecationWarning in scope 13:57
sean-k-mooneyi belive its actully warnings.DeprecationWarning13:57
sean-k-mooneyhttps://docs.python.org/3/library/exceptions.html#DeprecationWarning13:57
sean-k-mooneyoh maybe not13:57
sean-k-mooneyits oen of the based builting excption classes13:58
sean-k-mooneyok that should be in scope by default13:58
sean-k-mooneyand ya that confirm the behavior13:58
sean-k-mooney"""Ignored by the default warning filters, except in the __main__ module (PEP 565). Enabling the Python Development Mode shows this warning."""13:58
sean-k-mooneyso we are not running in developer mode when we exectue tempest13:59
sean-k-mooneyso thsoe are ignored by default13:59
opendevreviewchandan kumar proposed openstack/watcher-tempest-plugin master: Add deprecation about client_functional tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94313314:42
chandankumarsean-k-mooney: in the last run, it came like this https://paste.openstack.org/raw/bgUVgcAtJMl6cpnM7FKG/14:44
chandankumarhttps://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_175/openstack/175578d652e44550b22f85b62e692291/job-output.txt14:44
opendevreviewAlfredo Moralejo proposed openstack/watcher-tempest-plugin master: Add real-data scenario tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94561314:45
chandankumaror we can go via this https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings14:47
sean-k-mooneychandankumar: that looks like we would expect14:56
sean-k-mooneyits printed twice webase we scan the test once to buidl the test cases for each worker14:57
sean-k-mooneythen we run the tests in a sepreate interpertr14:57
sean-k-mooneyso we expect ti to be print 1+n times where n is the number of tempest workers14:58
sean-k-mooneyso this is working as expected.14:58
sean-k-mooneyno need to change anything14:58
sean-k-mooneywhy did you upload v814:59
sean-k-mooneythat looks incorect as it never going to actully log anything now14:59
sean-k-mooneywe shoudl revert back to v715:00
chandankumarjust wanted to check the message what it returns15:04
chandankumarI will revert back to v715:04
sean-k-mooneyyou remove the raising of the message15:07
sean-k-mooneyv8 sets up a filter to remove the message it does not raise one15:08
opendevreviewchandan kumar proposed openstack/watcher-tempest-plugin master: Add deprecation about client_functional tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94313315:08
chandankumarah ok, thank you for explaining :-)15:09
chandankumarthank you sean-k-mooney for helping on the deprecation patch. :-)15:09
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Add real-data based tests to experimental pipeline  https://review.opendev.org/c/openstack/watcher/+/94562715:43
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Add real-data based tests to experimental pipeline  https://review.opendev.org/c/openstack/watcher/+/94562716:05
opendevreviewAlfredo Moralejo proposed openstack/watcher-tempest-plugin master: Add real-data scenario tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94561316:47
opendevreviewGhanshyam proposed openstack/watcher-tempest-plugin master: Add deprecation about client_functional tests  https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/94313317:53
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Add real-data based tests to experimental pipeline  https://review.opendev.org/c/openstack/watcher/+/94562719:10

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