Skip to content

[Request]: Use label instead of id to discriminate default network as a system resource. #1122

Description

@jglogan

Feature or enhancement request details

Tasks

  • Add role label of builtin when creating default network.
  • Data migration - when loading networks at startup, test id id == ClientNetwork.defaultNetworkName and true and isUserResource is true, add label and rewrite entity back to the entity store.
  • Replace all other id == ClientNetwork.defaultNetworkName checks with label test.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added this to the 2026-01 milestone on Jan 31, 2026
  2. self-assigned this
    on Jan 31, 2026
  3. added
    facet/network
    on Jan 31, 2026
  4. added theissue type on Jan 31, 2026
  5. jglogan commented on Jan 31, 2026

    @jglogan
    ContributorAuthor

    Local tests

    Apply builtin role label to default network at startup.

    % cat ~/Library/Application\ Support/com.apple.container/networks/default/entity.json| jq
    {
      "labels": {},
      "mode": "nat",
      "creationDate": 791413601.151796,
      "id": "default"
    }
    
    % container system start                                                                 
    Warning! Running debug build. Performance may be degraded.
    Verifying apiserver is running...
    
    % cat ~/Library/Application\ Support/com.apple.container/networks/default/entity.json| jq
    {
      "labels": {
        "com.apple.container.resource.role": "builtin"
      },
      "id": "default",
      "creationDate": 791413601.151796,
      "mode": "nat"
    }
    
    %
    

    Prevent deletion of builtin network

    % container network rm default
    Warning! Running debug build. Performance may be degraded.
    Error: invalidArgument: "cannot delete a builtin network: default"
    
    %
    

    Network prune

    % container network create foo
    Warning! Running debug build. Performance may be degraded.
    foo
    
    % container network prune
    Warning! Running debug build. Performance may be degraded.
    foo
    
    %
    

    Builder container role

    % container builder start
    Warning! Running debug build. Performance may be degraded.
    
    % container inspect buildkit | jq '.[0].configuration.labels'
    Warning! Running debug build. Performance may be degraded.
    {
      "com.apple.container.resource.role": "builder"
    }
    
    %
    
  6. added 2 commits that reference this issue on Jan 31, 2026
    9e983ba
    5d7368d
  7. added a commit that references this issue on Feb 2, 2026
    b3b5c3e
  8. added a commit that references this issue on Feb 4, 2026
    8b79ec5
  9. added a commit that references this issue on Feb 18, 2026
    61c0378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

facet/network

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions