Tuesday, 2026-02-24

amoralejdviroel, lgtm09:22
amoralejsorry, i missed your message yesterday09:22
opendevreviewJoan Gilabert proposed openstack/watcher master: Prepare to use openstacksdk instead of novaclient  https://review.opendev.org/c/openstack/watcher/+/97471009:40
opendevreviewJoan Gilabert proposed openstack/watcher master: Complete migration from novaclient to openstacksdk  https://review.opendev.org/c/openstack/watcher/+/97492409:40
opendevreviewJoan Gilabert proposed openstack/watcher master: Remove usage of novaclient from Watcher  https://review.opendev.org/c/openstack/watcher/+/97492509:40
opendevreviewJoan Gilabert proposed openstack/watcher master: Remove nova_helper retries for openstacksdk params  https://review.opendev.org/c/openstack/watcher/+/97549809:40
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Skip change_nova_service_state actions in pre_condition phase  https://review.opendev.org/c/openstack/watcher/+/97734009:44
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Add get_flavor_id method to nova_helper  https://review.opendev.org/c/openstack/watcher/+/97777209:53
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Skip resize actions in pre_condition phase  https://review.opendev.org/c/openstack/watcher/+/97777309:53
amoralejI've been hitting https://bugs.launchpad.net/watcher/+bug/2142486 while testing the openstacksdk patches. I see it could be fixed in different levels, sqlalchemy models, objects, or applying some status_message_normalize method before updating it anywhere. What would be the best approach? any opinion? 09:58
sean-k-mooneyamoralej: the status message shoudl not have the fully execption traceback or a long message in general10:33
sean-k-mooneyamoralej: if we are storign that today that a bug10:33
sean-k-mooneyit should have only the user facing message and perhaps the name of the expction10:34
amoralejhttps://github.com/openstack/watcher/blob/18cb461373c2a7320f2c9506681fb2b01888e3c6/watcher/applier/workflow_engine/base.py#L184-L18710:35
amoralejthat's where it comes from10:35
amoralejwuoldn't that be the user facing message ?10:36
sean-k-mooneywe are catching Excption there10:37
sean-k-mooneywe shoudl really only be catching one of our watcher expctions10:37
sean-k-mooneythe bug looked like it was some networing excption10:37
amoralejactually, yes, that was the case10:37
sean-k-mooneyHTTPSConnectionPool(host='nova ... (152 characters truncated) ... NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb167c4b500>: Failed to establish a new connection: [Errno 111] ECONNREFUSED'))10:37
amoralejit was raising a connectivity error10:38
sean-k-mooneyya10:38
sean-k-mooneyso we need to do 2 things10:38
amoraleji disabled nova-api for that test10:38
sean-k-mooneyfor generic exctption we need to convert them to a new excption with a fixed lenght10:38
sean-k-mooneyfor anything that inherits form our watcher base exection class it shoudl be fine10:38
sean-k-mooneyto catch and store them10:38
sean-k-mooneybasicly i woudl add another except clasue before this for WatcherException10:40
sean-k-mooneyhttps://github.com/openstack/watcher/blob/master/watcher/common/exception.py#L5610:40
sean-k-mooneyand then update the current code to do `% type(e)` instead of `% str(e)`10:41
amoralejack, lemme check that10:41
amoralejno need to cut to 254 in other places as a safety measure?10:42
amoralejimpact is uggly as it fails to update state to FAILED, we maybe should also split the save to two different ones, one for state one for status_message ?10:43
sean-k-mooneywell the fact that notify is modifyign db state is actully the ugly part10:44
sean-k-mooneyit shoud jsut be a action.save()10:44
sean-k-mooneybut to your point about truncation10:44
sean-k-mooneywe might want ot have a helper function that will take the excption and do the extract or truncate to tyep for us10:45
amoralejanyway, if we would do action.save() we'd have similar problem if we do it in just one save i think10:45
sean-k-mooneyand just use it everywhre 10:45
sean-k-mooneyamoralej: it would yes just notify in other project woudl not muteat the state in teh db10:46
sean-k-mooneyit just bad naming10:46
amoralejyep, i agree that it is missleading10:46
sean-k-mooneyhttps://github.com/openstack/watcher/blob/18cb461373c2a7320f2c9506681fb2b01888e3c6/watcher/applier/workflow_engine/base.py#L82-L8910:46
sean-k-mooneythat what it actully does it doe a get follwoed by a update and save10:46
amoralejwstatus_message not always comes directly from exceptions, the helper would need to be more generic, that's why i was thinking in just string truncating10:48
sean-k-mooneyto me string tuncation is itself a bug10:48
sean-k-mooneywe should never need to do that so if it ever truncated we woudl need to log an error and fix it when the bug is reported10:48
sean-k-mooneyreportign a shorter message like the execption name is however a good compromies10:49
amoralejok, lemme apply your proposal of splitting WatcherException + type(e) for Exception, i think that will fix the issue10:49
sean-k-mooneyfor oure excptions we can ensure our message fit withing the db field lenght10:49
amoralejalthough we may be bundling lower level exception messages in some of our internal exceptions, lemme take a look10:50
sean-k-mooneywe do now start usign raise from e10:51
sean-k-mooneybut that should not extend the message 10:51
sean-k-mooneyjust the trace back10:51
sean-k-mooneyi.e. we are now using excpetion chianing10:51
sean-k-mooneyhttps://docs.python.org/3/tutorial/errors.html#exception-chaining10:52
amoralejhttps://github.com/openstack/watcher/blob/18cb461373c2a7320f2c9506681fb2b01888e3c6/watcher/applier/workflow_engine/default.py#L130-L13710:57
amoralejraise exception.WorkflowExecutionException(error=e)10:57
amoralejraise exception.WorkflowExecutionException(error=e)10:57
amoralejwuld that impact the message?10:57
sean-k-mooney ya so that shoudl likely be refactored10:58
sean-k-mooneywe shoudl do raise exception.WorkflowExecutionException(error="short error") form e10:59
sean-k-mooneyperhaps raise exception.WorkflowExecutionException(error=type(e)) form e10:59
sean-k-mooneythat will print the name in the string but provide the full details in teh traceback in the logs11:00
sean-k-mooneyat least i belive htat is how that works11:00
amoraleji'll check it11:00
sean-k-mooneyby the way this https://github.com/openstack/watcher/blob/18cb461373c2a7320f2c9506681fb2b01888e3c6/watcher/applier/workflow_engine/default.py#L132 is a bug11:01
sean-k-mooneywe shoudl not raise a exepciotn class we shoudl raise a instnace of the expction11:01
sean-k-mooneyi.e. there shoudl be ()11:01
amoralejyep, that's a bug11:02
opendevreviewJoan Gilabert proposed openstack/watcher master: Remove nova_helper retries for openstacksdk params  https://review.opendev.org/c/openstack/watcher/+/97549811:24
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Check Audit state in the applier before starting the execution  https://review.opendev.org/c/openstack/watcher/+/97778611:38
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Check Audit state in the decision-engine before starting the execution  https://review.opendev.org/c/openstack/watcher/+/97778611:55
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Add get_flavor_id method to nova_helper  https://review.opendev.org/c/openstack/watcher/+/97777214:20
opendevreviewAlfredo Moralejo proposed openstack/watcher master: Skip resize actions in pre_condition phase  https://review.opendev.org/c/openstack/watcher/+/97777314:20
opendevreviewMerged openstack/watcher master: Prepare to use openstacksdk instead of novaclient  https://review.opendev.org/c/openstack/watcher/+/97471014:48
sean-k-mooneyamoralej: did you have time to test chandans watcher dashboard fix for the skip action16:09
sean-k-mooneyis that ready for review?16:09
amoralejsean-k-mooney, let me test the latest PS16:27
*** gmaan is now known as gmaan_afk16:29
amoralejI'd say so, based on the content of latest changes16:31
sean-k-mooneyack ill try and get to it today so16:35
sean-k-mooneyit would be nice to wap that up before FF16:35
*** gmaan_afk is now known as gmaan17:37
dviroelsean-k-mooney: hey, if you are around, PTAL on minor changes in https://review.opendev.org/c/openstack/watcher/+/974925 since your last +220:40
dviroelparent commit is running gate now20:40
sean-k-mooneysure20:41
sean-k-mooneydviroel: is this really a bug https://review.opendev.org/c/openstack/watcher/+/974925/comment/d848a5b5_1a9a53c9/20:49
sean-k-mooneyit looks valid to me20:50
dviroelyeah, correct, doesn't make sense20:55
sean-k-mooneydo we want to fix that in a followup or proceed with the change20:56
sean-k-mooney*and proceed 20:56
sean-k-mooneyor do we want to leave joan fix it tomorrow20:57
dviroelyeah this is delaying other patches in the series20:57
dviroelmay he can fix in one the the other patches20:57
dviroelI still can follow up this one if we W+20:58
sean-k-mooneyack ill leave a comment to that effect and approve it20:58
dviroelack20:58
sean-k-mooneyok +2w20:59
dviroeltks sean20:59
sean-k-mooneythe operator job is unhappy21:00
sean-k-mooneyany idea why?21:00
sean-k-mooneylooks like crc failed21:01
sean-k-mooneywaiting for ectd21:01
sean-k-mooneyor the api server ot be read so this is unrealted21:01
opendevreviewMerged openstack/watcher master: Complete migration from novaclient to openstacksdk  https://review.opendev.org/c/openstack/watcher/+/97492421:44
opendevreviewMerged openstack/watcher master: Remove usage of novaclient from Watcher  https://review.opendev.org/c/openstack/watcher/+/97492522:33

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