Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack trace is printed when a tasks tmpdir is deleted before bolt can delete it #2245

Closed
adreyer opened this issue Oct 7, 2020 · 0 comments · Fixed by #2287
Closed

Stack trace is printed when a tasks tmpdir is deleted before bolt can delete it #2245

adreyer opened this issue Oct 7, 2020 · 0 comments · Fixed by #2287
Assignees
Labels
Bug Bug reports and fixes.

Comments

@adreyer
Copy link
Contributor

adreyer commented Oct 7, 2020

Describe the Bug

If something else has deleted the task's tmpdir after the task completes successfully but before bolt can delete it bolt prints an ugly stack trace message.

Expected Behavior

We should print a simple helpful warning when we deleting a tasks tmpdir fails.

@adreyer adreyer added the Bug Bug reports and fixes. label Oct 7, 2020
@beechtom beechtom self-assigned this Oct 26, 2020
beechtom added a commit to beechtom/bolt that referenced this issue Oct 26, 2020
… for PAL

This updates `Bolt::PAL.with_puppet_settings` to safely delete the
tmpdir used to configure Puppet. Previously, the tmpdir was created with
a block, which would result in the tmpdir being automatically deleted
once the block completed. However, if the tmpdir was deleted before this
happened, Bolt would error and show a stacktrace. Now, Bolt manually
deletes the tmpdir if it exists instead of relying on the `mktmpdir`
method to do it automatically.

!bug

* **Safely delete tmpdir used to configure Puppet for PAL**
  ([puppetlabs#2245](puppetlabs#2245))

  Bolt now safely deletes the tmpdir used to configure Puppet when using
  PAL. Previously, if the tmpdir was deleted during a Bolt run before
  Bolt deleted the directory itself, an error with a stacktrace would be
  raised.
lucywyman added a commit that referenced this issue Oct 27, 2020
(GH-2245) Safely delete tmpdir used when configuring Puppet for PAL
dontlaugh pushed a commit to dontlaugh/bolt that referenced this issue Nov 22, 2020
… for PAL

This updates `Bolt::PAL.with_puppet_settings` to safely delete the
tmpdir used to configure Puppet. Previously, the tmpdir was created with
a block, which would result in the tmpdir being automatically deleted
once the block completed. However, if the tmpdir was deleted before this
happened, Bolt would error and show a stacktrace. Now, Bolt manually
deletes the tmpdir if it exists instead of relying on the `mktmpdir`
method to do it automatically.

!bug

* **Safely delete tmpdir used to configure Puppet for PAL**
  ([puppetlabs#2245](puppetlabs#2245))

  Bolt now safely deletes the tmpdir used to configure Puppet when using
  PAL. Previously, if the tmpdir was deleted during a Bolt run before
  Bolt deleted the directory itself, an error with a stacktrace would be
  raised.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug reports and fixes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants