Skip to content

Conversation

@mguentner
Copy link
Contributor

Issue: #7083

The location of the warn! statements cover both NetConfig::parse and NetConfig creation via deserialization using serde.

Preparation for a PR like #7076 in a few releases.

@mguentner mguentner requested a review from a team as a code owner July 7, 2025 09:24
@mguentner
Copy link
Contributor Author

When adding a new net device using ch-remote, the default IP is assigned by fn add_net_config by calling NetConfig::parse, then serializing it back to json (fn add_net_config), NetConfig::parse calls default_netconfig_?.
Since ch-remote.rs does not register a logger using e.g. log::set_boxed_logger like the main cloud-hypervisor binary does, all warnings generated using log! macros are not printed.

Should I add a corresponding logger? This may be unexpected behavior for users as currently no logs are printed at all besides the result of the command.

@likebreath
Copy link
Member

Should I add a corresponding logger? This may be unexpected behavior for users as currently no logs are printed at all besides the result of the command.

I think that's a good idea. Would you please open a follow-up PR for that? Thank you.

@likebreath likebreath moved this to 🏗 In progress in Cloud Hypervisor Roadmap Jul 7, 2025
@likebreath likebreath added this pull request to the merge queue Jul 8, 2025
Merged via the queue into cloud-hypervisor:main with commit f9c1344 Jul 8, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Cloud Hypervisor Roadmap Jul 8, 2025
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 18, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 18, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 20, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

This introduces a new constraint:
When providing an IP, the mask must also be provided.

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 20, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

This introduces a new constraint:
When providing an IP, the mask must also be provided.

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 20, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

This introduces a new constraint:
When providing an IP, the mask must also be provided.

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
mguentner added a commit to mguentner/cloud-hypervisor that referenced this pull request Sep 22, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

This introduces a new constraint:
When providing an IP, the mask must also be provided.

Removes warnings introduced in cloud-hypervisor#7179.
Closes issue cloud-hypervisor#7083.

Signed-off-by: Maximilian Güntner <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Sep 22, 2025
This change enables easier integration with third-party
tools by removing the requirement for a dummy IP address
when configuring tap devices. The modification applies to
both CLI and API interactions.

Previously, cloud-hypervisor would automatically set a
default static IP address (192.168.249.1) if none was provided.

This could lead to:

* multiple devices without explicit IP configurations
  would end up with the same default IP
* unnecessary inclusion of this IP in firewall rules
* the IP address could clash with host networking and
  routing

This introduces a new constraint:
When providing an IP, the mask must also be provided.

Removes warnings introduced in #7179.
Closes issue #7083.

Signed-off-by: Maximilian Güntner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants