Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DataSourceNone warning in cc_final_message #5192

Closed
TheRealFalcon opened this issue Apr 19, 2024 · 1 comment · Fixed by #5215
Closed

Remove DataSourceNone warning in cc_final_message #5192

TheRealFalcon opened this issue Apr 19, 2024 · 1 comment · Fixed by #5215
Assignees
Labels
enhancement New feature or request good first issue

Comments

@TheRealFalcon
Copy link
Member

Bug report

In the past, DataSourceNone was used purely as a fallback for when a primary datasource failed. However, DataSourceNone can be a datasource in an of itself and preferrable to NoCloud if all configuration is baked into the image. Because of this, it no longer makes sense to issue a warning in cc_final_message if None was expected. If there is defined userdata/metadata under the datasource definition in /etc/cloud or DataSourceNone is the only entry in the datasource_list, we should not warn that DataSourceNone was used.

@TheRealFalcon TheRealFalcon added the enhancement New feature or request label Apr 19, 2024
@blackboxsw blackboxsw self-assigned this Apr 25, 2024
@Meulengracht
Copy link
Member

We use data source [None] when testing Ubuntu Core, and I believe Certification team is too. The warning it produces to use this causes snapd to handle cloud-init status as an error, even when it actually produces the output status: done.

It seems like this is a new thing with the Noble build, on Jammy this seems a non issue

blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Apr 25, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Apr 25, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Apr 25, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Apr 25, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Apr 25, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit to blackboxsw/cloud-init that referenced this issue Jun 5, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: canonicalGH-5192
blackboxsw added a commit that referenced this issue Jun 5, 2024
Avoid warning level log "Used fallback datasource" when base
configuration defines `datasource_list: [ None ]`.

Using DataSourceNone in this case is desired behavior.

Also drop unused is_disconnected property from DataSource
which was only used by DataSourceNone in cc_final_message.

Instead compare based on dsname property.

Fixes: GH-5192
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants