What exactly should the `--no-profiles` flag do?

I am a bit confused about the --no-profiles flag of lxc launch and lxc init.
When the flag was introduced in 3.0.1 the behaviour was always to apply the default profile, even when the --no-profiles flag was set.
My expectation was that --no-profiles would use no profiles (not even default), otherwise the flag just doesn’t have any effect, so what was the intention of the flag?

This looks like a bug to me. Looking into a fix…

It should force the use of an empty profiles list, rather than a nil profiles list (which will then use the default profile).

2 Likes

Speculatively It looks like somewhere along the line the meaning changed.

Now when lxc sends create request with --no-profiles it sends null which i assume go treats as nil and then uses the default, should it not be sending an empty array when using that option?

I wonder if a custom client can work around that limitation

1 Like