Skip to content

Allow sharing specific networks with restricted projects - #3875

Merged
stgraber merged 13 commits into
lxc:mainfrom
stgraber:network
Aug 22, 2026
Merged

stgraber merged 13 commits into
lxc:mainfrom
stgraber:network

Conversation

@stgraber

Copy link
Copy Markdown
Member

This allows for sharing of specific networks from the default project with another project which has both features.networks=true (OVN) and restricted=true enabled.

In that scenario, setting restricted.networks.access allows read-only access of specific managed networks.

The reason for all this is to have projects which are otherwise isolated with their own network view (OVN) to still be passed a select set of administrator-managed networks.

A concrete example of this would be an environment where a tenant has access to a project with OVN enabled. They can create their own OVN networks but there's also a physical network (VLAN) which they need to be able to access.

That's exactly the case we're running into with the Linux Containers lab where the majority of our networks are OVN networks for Github runners or similar builders, but we also have a physical lab with physical machines sitting on a VLAN which we need to access from within the environment.

โ€ฆtworks.access

Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
Signed-off-by: Stรฉphane Graber <stgraber@stgraber.org>
@github-actions github-actions Bot added the Documentation Documentation needs updating label Aug 21, 2026
Comment thread cmd/incusd/daemon.go
return project.ImageProjectFromRecord(p)
}

if objectType == auth.ObjectTypeNetwork && len(muxVars) > 0 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For my culture, when does len(muxVars) == 0 in that context?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just panic prevention to avoid a potential access of a non-existent index. Though currently all codepaths using a network object type do pass at least a name through.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still, there are plenty of places in this function that donโ€™t check it, so we may wanna be a tad more consistent on those.

Comment thread cmd/incusd/patches.go Resolved
@stgraber
stgraber merged commit 554b377 into lxc:main Aug 22, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Development

Successfully merging this pull request may close these issues.

2 participants