Ability to control juju backup tmp directory

Bug #1693068 reported by Thomas Cuthbert on 2017-05-24
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju
Medium
Adrian Garcia Prado

Bug Description

GH PR https://github.com/juju/juju/pull/8339

In instances where the disk /tmp is stored on is too full to store the tmp files required for juju create-backup it would be beneficial to control the /tmp location so we can set it to a volume with greater storage capacity.

Ian Booth (wallyworld) on 2017-05-24
Changed in juju:
milestone: none → 2.3-alpha1
importance: Undecided → Medium
status: New → Triaged
tags: added: bitesize papercut
Changed in juju:
milestone: 2.3-beta1 → 2.3-beta2
Changed in juju:
milestone: 2.3-beta2 → none
Paul Gear (paulgear) wrote :

Given that this can prevent safe upgrades due to lack of backups, the papercut tag seems inappropriate.

Tim Penhey (thumper) on 2017-11-24
Changed in juju:
milestone: none → 2.3.1
tags: added: canonical-is
removed: papercut
Tim Penhey (thumper) wrote :

/tmp comes from:

state/backups/create.go:112

func newBuilder(filesToBackUp []string, db DBDumper) (b *builder, err error) {
 // Create the backups workspace root directory.
 rootDir, err := ioutil.TempDir("", tempPrefix)
 if err != nil {
  return nil, errors.Annotate(err, "while making backups workspace")
 }
...

ioutil.TempDir uses os.TempDir if empty string passed in.

To resolve this issue, a configurable temp dir needs to be passed in to this method from the outside.

@Paul, there are two options:
 * model config value
 * command line argument

Do you have a strong preference one way or the other?

(FWIW, they could edit the /etc/.../jujud-machine-?.conf file and add the
Environment line to set temp to what they want.

On Fri, Nov 24, 2017 at 6:36 AM, Tim Penhey <email address hidden>
wrote:

> /tmp comes from:
>
> state/backups/create.go:112
>
>
> func newBuilder(filesToBackUp []string, db DBDumper) (b *builder, err
> error) {
> // Create the backups workspace root directory.
> rootDir, err := ioutil.TempDir("", tempPrefix)
> if err != nil {
> return nil, errors.Annotate(err, "while making backups
> workspace")
> }
> ...
>
>
> ioutil.TempDir uses os.TempDir if empty string passed in.
>
> To resolve this issue, a configurable temp dir needs to be passed in to
> this method from the outside.
>
> @Paul, there are two options:
> * model config value
> * command line argument
>
> Do you have a strong preference one way or the other?
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1693068
>
> Title:
> Ability to control juju backup tmp directory
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1693068/+subscriptions
>

Paul Gear (paulgear) wrote :

There are pros & cons to both model config and CLI. How hard would it be to implement both?

Changed in juju:
milestone: 2.3.1 → none
Tim Penhey (thumper) on 2017-12-10
Changed in juju:
milestone: none → 2.3.2
tags: added: backup-restore
Ian Booth (wallyworld) on 2018-01-12
Changed in juju:
assignee: nobody → Adrian Garcia Prado (agprado)
Changed in juju:
milestone: 2.3.2 → 2.3.3
Adrian Garcia Prado (agprado) wrote :
Changed in juju:
status: Triaged → In Progress
description: updated
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Ian Booth (wallyworld) on 2018-02-15
Changed in juju:
milestone: 2.3.3 → 2.4-beta1
status: Fix Released → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers