Skip to content

[radv] fix bug for radv can't startup if DEVICE_METADATA.localhost.type not exist#7651

Merged
prsunny merged 1 commit intosonic-net:masterfrom
CentecNetworks:fix_bug_for_radv_startup
May 25, 2021
Merged

[radv] fix bug for radv can't startup if DEVICE_METADATA.localhost.type not exist#7651
prsunny merged 1 commit intosonic-net:masterfrom
CentecNetworks:fix_bug_for_radv_startup

Conversation

@LuiSzee
Copy link
Copy Markdown
Contributor

@LuiSzee LuiSzee commented May 19, 2021

Why I did it

docker radv can't startup if DEVICE_METADATA.localhost.type not exist

How I did it

add check for DEVICE_METADATA.localhost.type exist

How to verify it

build the sonic image, run on board, and radv can startup

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

@LuiSzee LuiSzee requested a review from lguohan as a code owner May 19, 2021 10:28
@ghost
Copy link
Copy Markdown

ghost commented May 19, 2021

CLA assistant check
All CLA requirements met.

{%- set vlan_v6.count = vlan_v6.count + 1 -%}
{%- endif -%}
{%- endfor -%}
{%- if DEVICE_METADATA.localhost.type -%}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why would localhost.type not exists. This field is being used in multiple places in Sonic. IMO, this is a missing config. However, changes lgtm. @jleveque for viz.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree. This change will not hurt anything, but I don't understand a situation where DEVICE_METADATA.localhost.type would not exist.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Config default_preset field in default_sku to l2, then the generated config_db.json won't have DEVICE_METADATA.localhost.type field.
sonic-cfggen was upgraded to python3. If DEVICE_METADATA.localhost.type is not exist, rendering docker-router-advertiser.supervisord.conf.j2 will fail.

@jleveque
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jleveque
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit cf83a99 into sonic-net:master May 25, 2021
yxieca pushed a commit that referenced this pull request May 26, 2021
…pe is NULL (#7651)

Co-authored-by: Shi Lei <shil@centecnetworks.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…pe is NULL (sonic-net#7651)

Co-authored-by: Shi Lei <shil@centecnetworks.com>
@LuiSzee LuiSzee deleted the fix_bug_for_radv_startup branch November 22, 2021 05:32
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.

5 participants