Skip to content

[Arista] Fix Clearwater2 phy initialization when no configuration is provided#8271

Merged
arlakshm merged 2 commits intosonic-net:masterfrom
Staphylo:master-phy-credo-2
Sep 9, 2021
Merged

[Arista] Fix Clearwater2 phy initialization when no configuration is provided#8271
arlakshm merged 2 commits intosonic-net:masterfrom
Staphylo:master-phy-credo-2

Conversation

@Staphylo
Copy link
Collaborator

Why I did it

Fix an issue on the Clearwater2 linecard.
When the linecard is started with a fresh image without configuration, phys would not be initialized.

How I did it

Added default_sku for Clearwater2 which prevents config-setup from failing to create a default config_db.json.
Added some extra logic in the phy-credo-init script to run the phy_config.sh of the hwsku pointed by default_sku if the DEVICE_METADATA.localhost.hwsku information is not populated in CONFIG_DB.

How to verify it

Booting an image with this change and without configuration will lead to the phys being initialized using the phy_config.sh from default_sku.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Cherry-pick required for the 202106 chassis branch.

Description for the changelog

Fix phy initialization on Clearwater2 when booting without configuration

Staphylo added 2 commits July 29, 2021 12:26
The config-setup service will fail to initialize the database if the
default_sku file is missing.
It will try to run `sonic-cfggen` with an empty parameter to the `-k` option.

Adding this default_sku will prevent further issues.
@Staphylo Staphylo force-pushed the master-phy-credo-2 branch from 497d2d0 to 5a68a81 Compare July 29, 2021 19:26
@Staphylo
Copy link
Collaborator Author

Staphylo commented Aug 3, 2021

@lguohan

@arlakshm
Copy link
Contributor

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

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

lgtm

@arlakshm
Copy link
Contributor

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor

arlakshm commented Sep 8, 2021

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm arlakshm merged commit f899a82 into sonic-net:master Sep 9, 2021
judyjoseph pushed a commit that referenced this pull request Sep 14, 2021
…provided (#8271)

Why I did it
Fix an issue on the Clearwater2 linecard.
When the linecard is started with a fresh image without configuration, phys would not be initialized.

How I did it
Added default_sku for Clearwater2 which prevents config-setup from failing to create a default config_db.json.
Added some extra logic in the phy-credo-init script to run the phy_config.sh of the hwsku pointed by default_sku if the DEVICE_METADATA.localhost.hwsku information is not populated in CONFIG_DB.

How to verify it
Booting an image with this change and without configuration will lead to the phys being initialized using the phy_config.sh from default_sku.
@Staphylo Staphylo deleted the master-phy-credo-2 branch December 6, 2022 15:03
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