/var/snap/octavia-diskimage-retrofit/common/tmp/* is not cleaned up

Bug #1976169 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-octavia-diskimage-retrofit
Fix Released
Undecided
Mustafa Kemal Gilor

Bug Description

It looks like the charm/snap doesn't clean up the tmp directory used for retrofitting process. After retrofitting many images, the disk will be eventually full.

$ du -sh /var/snap/octavia-diskimage-retrofit/common/tmp/* | sort -h
0 /var/snap/octavia-diskimage-retrofit/common/tmp/tmp21xlfdbf
0 /var/snap/octavia-diskimage-retrofit/common/tmp/tmpfmc95aw4
0 /var/snap/octavia-diskimage-retrofit/common/tmp/tmpupe3iole
76K /var/snap/octavia-diskimage-retrofit/common/tmp/tmpa700ulzg.manifest
76K /var/snap/octavia-diskimage-retrofit/common/tmp/tmpb_y6jymx.manifest
76K /var/snap/octavia-diskimage-retrofit/common/tmp/tmpc561c49w.manifest
76K /var/snap/octavia-diskimage-retrofit/common/tmp/tmpcdx2lopz.manifest
196K /var/snap/octavia-diskimage-retrofit/common/tmp/tmpii5jhq5s
568M /var/snap/octavia-diskimage-retrofit/common/tmp/tmpey8auv3f
568M /var/snap/octavia-diskimage-retrofit/common/tmp/tmphxbtm_x6
568M /var/snap/octavia-diskimage-retrofit/common/tmp/tmps00bmmfi
568M /var/snap/octavia-diskimage-retrofit/common/tmp/tmpvjmv7y3b
568M /var/snap/octavia-diskimage-retrofit/common/tmp/tmpxvlm4e5u
597M /var/snap/octavia-diskimage-retrofit/common/tmp/tmpfi79y_4j
1.2G /var/snap/octavia-diskimage-retrofit/common/tmp/output-R9AiHJ.raw
1.2G /var/snap/octavia-diskimage-retrofit/common/tmp/tmpa700ulzg
1.2G /var/snap/octavia-diskimage-retrofit/common/tmp/tmpb_y6jymx
1.2G /var/snap/octavia-diskimage-retrofit/common/tmp/tmpc561c49w
1.2G /var/snap/octavia-diskimage-retrofit/common/tmp/tmpcdx2lopz

Nobuto Murata (nobuto)
tags: added: good-first-bug
Changed in charm-octavia-diskimage-retrofit:
status: New → Confirmed
assignee: nobody → Mustafa Kemal Gilor (mustafakemalgilor)
Changed in charm-octavia-diskimage-retrofit:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-octavia-diskimage-retrofit (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-octavia-diskimage-retrofit (master)

Reviewed: https://review.opendev.org/c/openstack/charm-octavia-diskimage-retrofit/+/847345
Committed: https://opendev.org/openstack/charm-octavia-diskimage-retrofit/commit/7e80dce5d35e93ece18220978073c9f1193fd473
Submitter: "Zuul (22348)"
Branch: master

commit 7e80dce5d35e93ece18220978073c9f1193fd473
Author: Mustafa Kemal Gilor <email address hidden>
Date: Thu Jun 23 16:13:22 2022 +0300

    invoke `hookenv._run_atexit()` when action ends

    the registered callbacks for `atexit()` were not executing due to
    `_run_atexit()` is not being called, the `ch_core.hookenv._run_atexit()`
    function is now explicitly called when action ends. also moved
    `ch_core.hookenv._run_atstart()` call to `main()` for consistency.

    Closes-bug: #1976169

    Signed-off-by: Mustafa Kemal Gilor <email address hidden>
    Change-Id: I2b976af908dd6ae6248f405fa6980beef0554be5

Changed in charm-octavia-diskimage-retrofit:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-octavia-diskimage-retrofit (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-octavia-diskimage-retrofit (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/charm-octavia-diskimage-retrofit/+/848007
Committed: https://opendev.org/openstack/charm-octavia-diskimage-retrofit/commit/aa37294b0f3156767475676241738489d2e296d9
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit aa37294b0f3156767475676241738489d2e296d9
Author: Mustafa Kemal Gilor <email address hidden>
Date: Thu Jun 23 16:13:22 2022 +0300

    invoke `hookenv._run_atexit()` when action ends

    the registered callbacks for `atexit()` were not executing due to
    `_run_atexit()` is not being called, the `ch_core.hookenv._run_atexit()`
    function is now explicitly called when action ends. also moved
    `ch_core.hookenv._run_atstart()` call to `main()` for consistency.

    Closes-bug: #1976169

    Signed-off-by: Mustafa Kemal Gilor <email address hidden>
    Change-Id: I2b976af908dd6ae6248f405fa6980beef0554be5
    (cherry picked from commit 7e80dce5d35e93ece18220978073c9f1193fd473)

tags: added: in-stable-yoga
Changed in charm-octavia-diskimage-retrofit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.