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

Handle feature flow when state is always_enabled #8811

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

dgsudharsan
Copy link
Collaborator

Why I did it

When feature state is set to always_enabled hostcfgd throws error message
Sep 21 22:30:55.135377 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature bgp
Sep 21 22:30:55.420268 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature database
Sep 21 22:30:58.672714 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature swss
This is due to feature == always_enabled not handled properly.

How I did it

Handled the scenario when feature is always enabled

How to verify it

Restart hostcfgd with feature state configured as always_enabled and check if there are no errors.
Added UT to cover the scenario.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@dgsudharsan dgsudharsan changed the title Hostcfgd fix Handle feature flow when state is always_enabled Sep 22, 2021
Copy link
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

@yozhao101 can you review this change? Is 'always_enabled' not allowed by design? If so, can you elaborate the reason?

@yozhao101
Copy link
Contributor

@yozhao101 can you review this change? Is 'always_enabled' not allowed by design? If so, can you elaborate the reason?

Ack. Reviewing ...

@yozhao101
Copy link
Contributor

@yozhao101 can you review this change? Is 'always_enabled' not allowed by design? If so, can you elaborate the reason?

The option always_enabled is actually allowed by design. I think this is a bug (fixed by this PR) introduced by: https://github.com/Azure/sonic-buildimage/pull/5744/files#diff-27d10088e7a11c3ae41f16e5272d96926179ae179c61d6fc32a25d0cfa40907eR181

@yxieca
Copy link
Contributor

yxieca commented Sep 27, 2021

@yozhao101 can you review this change? Is 'always_enabled' not allowed by design? If so, can you elaborate the reason?

The option always_enabled is actually allowed by design. I think this is a bug (fixed by this PR) introduced by: https://github.com/Azure/sonic-buildimage/pull/5744/files#diff-27d10088e7a11c3ae41f16e5272d96926179ae179c61d6fc32a25d0cfa40907eR181

Thanks for confirming!

@yxieca
Copy link
Contributor

yxieca commented Sep 27, 2021

@yozhao101 please sign off when you are done reviewing. Thanks!

@yozhao101
Copy link
Contributor

@yozhao101 please sign off when you are done reviewing. Thanks!

Approved!

@dgsudharsan
Copy link
Collaborator Author

Request for 202106

@yxieca yxieca merged commit b2659dc into sonic-net:master Sep 28, 2021
@dgsudharsan
Copy link
Collaborator Author

@yxieca Can you please add label for 202106?

judyjoseph pushed a commit that referenced this pull request Oct 5, 2021
Why I did it
When feature state is set to always_enabled hostcfgd throws error message
Sep 21 22:30:55.135377 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature bgp
Sep 21 22:30:55.420268 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature database
Sep 21 22:30:58.672714 r-leopard-32 ERR /hostcfgd: Unexpected state value 'always_enabled' for feature swss
This is due to feature == always_enabled not handled properly.

How I did it
Handled the scenario when feature is always enabled

How to verify it
Restart hostcfgd with feature state configured as always_enabled and check if there are no errors.
Added UT to cover the scenario.
@dgsudharsan dgsudharsan deleted the hostcfgd_fix branch March 9, 2023 01:54
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.

6 participants