Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

fix: prime NHC tarball within charm during packing #37

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

NucciTheBoss
Copy link
Member

Description

This pull request properly primes the NHC tarball within the slurmd operator so that the operator will deploy correctly. It ensures that the NHC tarball is placed in $CRAFT_PART_INSTALL so that it is eventually copied into the file artifact produced by charmcraft pack.

cc @jedel1043 helped with putting the initial patch together. After much boil and toil with discrepancies between our machines, we discovered that we needed to add charm: {} to the parts definition in charmcraft.yaml to ensure that the charm would pack correctly. If we just specified NHC, only NHC would be put into the final charm, none of the magic charm sauce 😱

How was the code tested?

Ran tests locally on my Ubuntu 24.04 workstation. Ensured that NHC was properly built during install hook execution.

Related issues and/or tasks

Fixes #36

Checklist

  • I am the author of these changes, or I have the rights to submit them.
  • I have added the relevant changes to the README and/or documentation.
  • I have self reviewed my own code.
  • All requested changes and/or review comments have been resolved.

Needed to add the part `charm: {}` to make the charm pack correctly.
jedel1043 and I found that this part declaration must be included in
`charmcraft.yaml`, or it will fail to pack the charm correctly.
nhc will be there, but the charm won't :'(

Signed-off-by: Jason C. Nucciarone <[email protected]>
Previously, if tar failed to extract the contents of the nhc
tarball to `/tmp/nhc`, _install_nhc_from_tarball would throw
an unhandled excepting that would cause the charm to bork.

Now we catch if tar fails to extract the contents of the tarball,
log the error output for the asministrator to read, and return False
so that the slurmd operator can properly handle and install failure.

Signed-off-by: Jason C. Nucciarone <[email protected]>
@NucciTheBoss NucciTheBoss added the bug Something isn't working label Jul 13, 2024
Copy link
Contributor

@jamesbeedy jamesbeedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checks out on my local build/deploy. Thanks @NucciTheBoss and @jedel1043 !

+1

@NucciTheBoss NucciTheBoss merged commit f0102f2 into charmed-hpc:main Jul 15, 2024
4 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NHC fails to build when deploying operator
3 participants