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

[install image] removing config_db.json with -f option #1753

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

yxieca
Copy link
Collaborator

@yxieca yxieca commented Jun 10, 2020

Summary:

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

If a DUT has already have the target image installed, then there will be no host/old_config/config_db.json afterward installing. Add -f option to ignore file not exists error.

At a second look, the DUT must have experienced multiple failure to get to this point: it must have an image installed but never rebooted (otherwise /host/old_config would have been removed). And then installed with another image which is already installed, so that we have /host/old_config/minigraph.yml, but no /host/old_config/config_db.json.

Either way, ignoring this failure would be necessary.

Signed-off-by: Ying Xie ying.xie@microsoft.com

How did you verify/test it?

Run ansible playboot upgrade_sonic.yml specifying an image already installed on the DUT.

If a DUT has already have the target image installed, then there
will be no /host/old_config/config_db.json afterward installing.
Add -f option to ignore file not exists error.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@yxieca yxieca merged commit ff8cd16 into sonic-net:master Jun 10, 2020
@yxieca yxieca deleted the install branch June 10, 2020 18:40
yxieca added a commit that referenced this pull request Jun 10, 2020
If a DUT has already have the target image installed, then there
will be no /host/old_config/config_db.json afterward installing.
Add -f option to ignore file not exists error.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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.

2 participants