Skip to content

chore: replace hostName with fqdnOrHostName#421

Open
felbinger wants to merge 1 commit intomicrovm-nix:mainfrom
secshellnet:fix-fqdn
Open

chore: replace hostName with fqdnOrHostName#421
felbinger wants to merge 1 commit intomicrovm-nix:mainfrom
secshellnet:fix-fqdn

Conversation

@felbinger
Copy link
Copy Markdown

Using fully qualified domain names as unique identifier for containers improves identification of containers on large (potentially multi tenant) hypervisors.

In the current version using a container name containing a dot doesn't work. I forked microvm.nix and adjusted it so that fqdn's are used by default.

Should we try to upstream this? If yes how?

I drafted this change because merging this would result in breaking changes if networking.domain is being set for a machine.

Copy link
Copy Markdown
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Modules that accept a mere networking.hostName but prefer a fully qualified domain name may use networking.fqdnOrHostName instead.

https://search.nixos.org/options?channel=unstable&show=networking.fqdn&query=networking.fqdn

@felbinger
Copy link
Copy Markdown
Author

I haven't had the time to test yet, will do in the next days...

@felbinger
Copy link
Copy Markdown
Author

I haven't had the time to test yet, will do in the next days...

Ok works. Now this change works without breaking changes if networking.domain is NOT set.

If I am correct, systems that have a domain set will still encounter breaking changes, right?

How should we proceed?

@felbinger felbinger marked this pull request as ready for review October 21, 2025 16:07
@felbinger felbinger changed the title chore: replace hostName with fqdn chore: replace hostName with fqdnOrHostName Oct 21, 2025
@SuperSandro2000
Copy link
Copy Markdown
Member

@astro how do we could handle this?

@SuperSandro2000
Copy link
Copy Markdown
Member

Also the CI tests are failing for some reason I did not grasp yet.

Copy link
Copy Markdown
Member

@astro astro left a comment

Choose a reason for hiding this comment

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

Is this a breaking change only if networking.domain is defined?

@felbinger
Copy link
Copy Markdown
Author

felbinger commented Nov 25, 2025

rebased with main and removed irrelevant comment i created while making the initial change

@SuperSandro2000
Copy link
Copy Markdown
Member

Why not add an option for the microvm name that defaults to networking.hostName and which you can change to something else like fqdn?

@felbinger
Copy link
Copy Markdown
Author

Why not add an option for the microvm name that defaults to networking.hostName and which you can change to something else like fqdn?

Works for me, if that's the way to get this change into microvm

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.

3 participants