Skip to content

feat(coredhcp): support config comments#49

Merged
synackd merged 2 commits intomainfrom
synackd/feat/coredhcp/support-comments
Mar 12, 2026
Merged

feat(coredhcp): support config comments#49
synackd merged 2 commits intomainfrom
synackd/feat/coredhcp/support-comments

Conversation

@synackd
Copy link
Collaborator

@synackd synackd commented Mar 11, 2026

Pull Request Template

Thank you for your contribution! Please ensure the following before submitting:

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Description

Add the ability to have comments in the CoreDHCP config for the coresmd and bootloop plugins. Comments work in both single-line and multi-line config formats. Comments begin with /* and end with */.

Example:

server4:
  plugins:
    ...
    - coresmd: |
        /* SMD base URI */
        svc_base_uri=https://foobar.openchami.cluster
        /* BSS base URI for obtaining boot scripts */
        ipxe_base_uri=http://172.16.0.253:8081
        /* OPTIONAL: path to CA trust certificate bundle */
        ca_cert=/root_ca/root_ca.crt
        /* OPTIONAL: duration that component/interface cache is valid (default 30s) */
        cache_valid=30s
        /* OPTIONAL: duration that served leases are valid (default 1h) */
        lease_time=1h
        /* OPTIONAL: toggle TFTP single-port mode (default false) */
        single_port=false
        /* OPTIONAL: TFTP server root directory (default /tftpboot) */
        tftp_dir=/tftpboot
        /* OPTIONAL: TFTP server listen port (default 69) */
        tftp_port=69
        /* OPTIONAL: pattern for determining node hostnames */
        node_pattern=nid{04d}
        /* OPTIONAL: pattern for determining BMC hostnames */
        bmc_pattern=bmc{04d}
        /* OPTIONAL: domain to append to hostnames */
        domain=openchami.cluster

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

For more info, see Contributing Guidelines.

synackd added 2 commits March 11, 2026 16:36
The comments are delineated via '/*' (begin) and '*/' (end).

Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
@synackd
Copy link
Collaborator Author

synackd commented Mar 11, 2026

This is to help self-document folks' CoreDHCP configs as the config options expand.

@synackd synackd force-pushed the synackd/feat/coredhcp/support-comments branch from e10671c to a261fcb Compare March 11, 2026 22:41
Copy link
Member

@alexlovelltroy alexlovelltroy left a comment

Choose a reason for hiding this comment

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

This looks really helpful. Good tests.

LGTM!

@synackd synackd merged commit d17a510 into main Mar 12, 2026
4 checks passed
@synackd synackd deleted the synackd/feat/coredhcp/support-comments branch March 12, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants