You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically: I found that there appears to be a bug in charmhelpers/contrib/openstack/deferred_events.py in the get_service_start_time function. That function tries to parse the output of "systemctl show $SERVICE --property=ActiveEnterTimestamp" - but if the service has never been started before (thus returning "n/a"), the function will raise an exception.
Looking at the code today, it seems the issue still exists. The code assumes that a blank string might be returned, but it does not expect an "n/a" string.
As a concrete example, on an affected machine, this is what I see:
ubuntu@REDACTED:~$ systemctl show dpdk --property=ActiveEnterTimestamp
ActiveEnterTimestamp=n/a
This would clearly break when it hits the datetime.datetime.strptime call since "n/a" doesn't match the specified parse pattern.
The text was updated successfully, but these errors were encountered:
This issue was first filed against https://bugs.launchpad.net/charm-ovn-chassis/+bug/2048806, but as I investigated the details, that bug appears to likely be due to a bug in charmhelpers, hence I'm creating a new bug here.
Specifically: I found that there appears to be a bug in charmhelpers/contrib/openstack/deferred_events.py in the get_service_start_time function. That function tries to parse the output of "systemctl show $SERVICE --property=ActiveEnterTimestamp" - but if the service has never been started before (thus returning "n/a"), the function will raise an exception.
Looking at the code today, it seems the issue still exists. The code assumes that a blank string might be returned, but it does not expect an "n/a" string.
As a concrete example, on an affected machine, this is what I see:
This would clearly break when it hits the datetime.datetime.strptime call since "n/a" doesn't match the specified parse pattern.
The text was updated successfully, but these errors were encountered: