Skip to content

Cobbler: Upgrade for 4.0.0 support - #404

Open
SchoolGuy wants to merge 1 commit into
masterfrom
feature/cobbler-4-0-0
Open

Cobbler: Upgrade for 4.0.0 support#404
SchoolGuy wants to merge 1 commit into
masterfrom
feature/cobbler-4-0-0

Conversation

@SchoolGuy

Copy link
Copy Markdown
Collaborator

This commit makes Orthos 2 compatible with Cobbler 4.0.0 and newer and removes support for Cobbler 3.3.x.

@SchoolGuy

Copy link
Copy Markdown
Collaborator Author

This PR is a rough draft and is not intended to be merged soon. There are a lot of TODOs open before this can be considered ready for merging.

@codacy-production

codacy-production Bot commented Jun 26, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 9 minor

Alerts:
⚠ 9 issues (≤ 0 issues of at least minor severity)

Results:
9 new issues

Category Results
Documentation 9 minor

View in Codacy

🟢 Metrics 13 complexity · 4 duplication

Metric Results
Complexity 13
Duplication 4

View in Codacy

🟢 Coverage 80.67% diff coverage · +0.07% coverage variation

Metric Results
Coverage variation +0.07% coverage variation (-1.00%)
Diff coverage 80.67% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4e93e8f) 23012 17115 74.37%
Head commit (fcf3e4c) 23071 (+59) 17175 (+60) 74.44% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#404) 119 96 80.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch 2 times, most recently from 71ed4f0 to a94e9c8 Compare July 6, 2026 12:00
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch from a94e9c8 to c725c1b Compare July 15, 2026 11:59
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch 7 times, most recently from 724db10 to cdf00a6 Compare July 31, 2026 07:43
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch from cdf00a6 to 9141238 Compare July 31, 2026 10:29
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch 2 times, most recently from eedb853 to 476a879 Compare August 13, 2026 12:41
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch from 476a879 to 79bce7f Compare August 14, 2026 08:54
@SchoolGuy SchoolGuy mentioned this pull request Aug 14, 2026
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch from 79bce7f to e42d760 Compare August 14, 2026 13:16
@SchoolGuy

Copy link
Copy Markdown
Collaborator Author

I am unable to find new issues with a Dockerized setup of Cobbler v4.0.0a7. This PR is ready for merging once all other components are tested for Cobbler v4.0.0a7.

@SchoolGuy
SchoolGuy marked this pull request as ready for review August 14, 2026 13:19
Makes Orthos 2 compatible with Cobbler 4.0.0 and newer and removes support
for Cobbler 3.3.x.

orthos2/utils/cobbler.py: Cobbler 4.0.0 moved several System/Profile
attributes off the item itself into nested "Option" sub-objects
(power.*, tftp.next_server_v4/v6) and resolves System.profile/
Profile.distro by item *uid* rather than by name - update every affected
XML-RPC call (power management, TFTP next-server, profile assignment) to
match, and add regression coverage in test_cobbler.py asserting the
correct attribute-path/uid shape rather than just call counts.

compose.common.yaml: replace the bespoke, zypper-built single-container
Cobbler image (docker/cobbler/, now removed) with upstream's own
published container images (cobblerd/http-api/cobbler-tftp/cobbler-dhcp/
cobbler-dns, plus a new cobbler-dhcp6 sidecar for DHCPv6), wired into the
existing Traefik-fronted "orthos" network:

- cobblerd/http-api split per upstream's reference stack, with a custom
  cobbler-settings config enabling DHCP/DNS management, managed forward/
  reverse zones for orthos2.test/192.0.2.0/24/2001:db8::/64, and explicit
  auto_migrate_settings/process_management.docker wiring so `cobbler
  sync` can restart the dhcp/dns/dhcp6 sidecars by Docker label.
- Custom DHCPv4/v6 and named.conf templates (docker/orthos/cobbler-
  templates/) covering the dev stack's 192.0.2.0/24/2001:db8::/64
  networks plus a dummy subnet for the "orthos" bridge network itself
  (pinned to a stable 172.20.0.0/16 so dhcpd has a subnet declaration to
  bind to), registered via docker/orthos/setup_cobbler_dhcp_templates.py
  and setup_cobbler_dns_templates.py - Cobbler 4.0 selects templates by
  DB tag, not a fixed file path.
- A shared cobbler-dns-zones volume so bind.py's rendered zone files
  actually reach the dns sidecar, and a logging_config.conf override so
  cobblerd logs to stdout instead of an in-container file.
- docker/orthos/setup_fake_cobbler_distro.py seeds a fake distro/profile
  for local machine-setup testing without a real distro tree.

Several real upstream Cobbler bugs surfaced while wiring this up and were
fixed on the Cobbler repo's own fix/dns-sidecar branch: dhcp6.template
referencing interface fields isc.py never populates, cobblerd's image
missing a dhcpd6.conf bind-mount symlink, and bind.py's named.conf
template lookup not preferring an "active"-tagged template over the
built-in one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@SchoolGuy
SchoolGuy force-pushed the feature/cobbler-4-0-0 branch from e42d760 to fcf3e4c Compare August 22, 2026 07:34
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.

1 participant