Activity log for bug #2037315

Date Who What changed Old value New value Message
2023-09-25 18:05:31 Adam Dyess bug added bug
2023-09-25 18:14:04 Adam Dyess layer-snap: assignee Adam Dyess (addyess)
2023-09-25 18:37:58 Adam Dyess layer-snap: status New In Progress
2023-09-25 19:05:53 Adam Dyess description The layer calls `snap refresh` but in the event of a failure doesn't log the reason for the failure. ```python hookenv.log("Refreshing {} from store".format(snapname)) out = subprocess.check_output(cmd, stderr=subprocess.STDOUT) print(out) ``` Doesn't catch subprocess.CalledProcessError which contains valid stderr that isn't logged https://pastebin.ubuntu.com/p/vWKbTd824p/ The layer calls `snap refresh` but in the event of a failure doesn't log the reason for the failure. ```python     hookenv.log("Refreshing {} from store".format(snapname))     out = subprocess.check_output(cmd, stderr=subprocess.STDOUT)     print(out) ``` Doesn't catch subprocess.CalledProcessError which contains valid stderr that isn't logged https://pastebin.ubuntu.com/p/vWKbTd824p/ It is LIKELY that retrying the snap refresh would complete successfully. We could use tenacity similar to `snap._install_store` to retry 3 times with 10s apart. Lets log each retry