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

[RFE] Provide optional command YAML for M&R phase using asyncio subprocess #471

Open
sadsfae opened this issue Apr 10, 2024 · 0 comments
Open

Comments

@sadsfae
Copy link
Member

sadsfae commented Apr 10, 2024

This RFE would cover supporting an optional YAML template that lets QUADS admins define free-form commands that can be run during the M&R (move_and_rebuild) phase of QUADS. We wouldn't fail on these commands they should be best-effort, though we should log their results.

We'd define commands/actions to run in a YAML template and process them using asyncio-driven subprocess calls via Python.

Scope

Some thought should be put into providing the ability when to run certain commands against systems, e.g. before kickstart. To avoid overcomplication we might just support one or two markers here like pre_provision and post_provision and tag those to appropriate methods for their marker phases.

We might also want some rudimentary asyncio return status to support basic depends between asyncio subprocess commands.

e.g.

pre_provision:
  cmd_name: dell_unmount_remoteimage
    cmd:  racadm remoteimage -d
      
post_provision:
  cmd_name: capture_lshw_info
    cmd: lshw -json > hostname.json

  cmd_name: copy lshw results
    cmd_depends: capture_lshw_info
    cmd: curl -T hostname.json ftp://ftp.example.com --user user:secret

I didn't include something like pre_release because our notify.py notification library takes care of this (it already sends webhooks for release for example) but this is moreso for actions to run during pre-release phases for things that are not fatal in non-execution for processing batches of systems.

Some Potential Usage

  • Run some arbitrary command that helps scoot systems out easier without having to develop and ship new M&R methods e.g. racadm remoteimage -d to unmount virtual media
  • Offload the lshw hardware collection process after a machine kickstarts (while we still have access to it, but before it gets assigned to tenants)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant