Skip to content

Conversation

@vittyvk
Copy link
Contributor

@vittyvk vittyvk commented Mar 21, 2025

Description

WALinuxAgent is Azure specific and Azure runs on Hyper-V. Add

ConditionVirtualization=microsoft

to service files to avoid starting WALA in other environments. In particular, this avoids polluting the console when the
same image is used both for Azure and some other env (e.g. local QEMU).

PR information

  • [ X ] Ensure development PR is based on the develop branch.
  • [ X ] The title of the PR is clear and informative.
  • [ X ] There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • [ - ] If applicable, the PR references the bug/issue that it fixes in the description.
  • [ - ] New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

WALinuxAgent is Azure specific and Azure runs on Hyper-V. Add

 ConditionVirtualization=microsoft

to service files to avoid starting WALA in other environments. In
particular, this avoids polluting the console when the same image is used
both for Azure and some other env (e.g. local QEMU).

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
@narrieta
Copy link
Member

@anhvoms - could you take a look?

Copy link
Member

@jeremycline jeremycline left a comment

Choose a reason for hiding this comment

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

For what it's worth, this looks good to me and helps reduce the patches distributions have to carry. There's a slight deviation from Fedora's downstream patch by Chris, but I think it's okay unless he has strong feelings about it being a triggering conditional.


ConditionFileIsExecutable=/usr/sbin/waagent
ConditionPathExists=/etc/waagent.conf
ConditionVirtualization=microsoft
Copy link
Member

Choose a reason for hiding this comment

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

This looks fine to me, although it does differ from the patch we're carrying in Fedora in that it's not a triggering conditional.

@cjp256 do you still feel that it should be a triggering conditional? In my opinion, it's just as easy to systemctl --edit --full waagent.service as it is to drop in an additional triggering conditional, but I've not thought hard about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants