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

[updategraph] After system upgrade, restore files/directories with original attributes etc. #2368

Merged
merged 2 commits into from
Feb 2, 2019

Conversation

zhenggen-xu
Copy link
Collaborator

@zhenggen-xu zhenggen-xu commented Dec 9, 2018

[updategraph] After system upgrade, restore files/directories with original attributes etc.
Restore a few more files that was missed before.
Restore FRR configuration directory if exists on old system

Signed-off-by: Zhenggen Xu zxu@linkedin.com

This depends on sonic-net/sonic-utilities#410

- What I did
Restore files/directories with original attributes.
Restore some missed configurations.

- How I did it
added missing files. use "cp -ar"

- How to verify it
build image with frr, and after "sonic_installer" and reboot into the new image, frr is restored with old attributes.

- Description for the changelog

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

yxieca
yxieca previously requested changes Dec 11, 2018
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.

Can you remove deployment_id_asn_map.yml from the copy list? This file is generated while building. Do you expect user to change this file? How do you plan to take new change from new image if so?

@zhenggen-xu
Copy link
Collaborator Author

@yxieca @taoyl-ms It is not very clear to me the usage of this file: deployment_id_asn_map.yml. My understanding is this is used to set the remote-as in bgp configuration. For any upgrade, we should keep all the configurations, including bgp configurations, I don't see why we should change the map during the upgrade even if new images have the new map.

For new switches builds, we could use the new map from new images. Also, this file should be changed for different environment, it only gives default mapping looks like.

Let's me know your opinion, it is easy to remove that file from copy list but would like understand the reason.

@yxieca
Copy link
Contributor

yxieca commented Dec 11, 2018

@zhenggen-xu

I did 'git grep' in sonic-buildiamge, sonic-utilities, sonic-platform-common, sonic-quagga, sonic-frr, I didn't see anyone updating this file. In sonic-buildimage, it is used as an initial template.

It might be reasonable to move this file under /usr/share/sonic/template instead (in a different PR).

Unless I missed something in sub modules that I didn't check, the usage of this file is very limited and should not be copied forward. Whatever effect this file has in the old image has been captured in config_db.

Please let me know your opinion.

Regards,
Ying

@zhenggen-xu
Copy link
Collaborator Author

@yxieca It is not necessarily updated by SONiC code. I would think this file should be downloaded as part of initial configuration (like ZTP). But during the upgrade process, I still think we should keep the old file so we have the same configuration. This file is used in conjunction with config_db data to generate the bgp configuration:
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf

@yxieca yxieca dismissed their stale review December 12, 2018 22:44

Need input from Guohan. Making myself non-blocking

@zhenggen-xu
Copy link
Collaborator Author

@lguohan Can you comment on this PR so we can close the discussion?

original attributes etc.
Restore a few more files that was missed before.
Restore FRR configuration directory if exists on old system

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
@zhenggen-xu
Copy link
Collaborator Author

zhenggen-xu commented Jan 26, 2019

@lguohan As talked, I removed the deployment_id_asn_map.yml from the restore file list, we will rely on the fact that we should keep this file backwards compatible from image to image, but the file could get upgraded.

@yxieca yxieca merged commit 982eddf into sonic-net:master Feb 2, 2019
yxieca pushed a commit that referenced this pull request Feb 2, 2019
…iginal attributes etc. (#2368)

* [updategraph] After system upgrade, restore files/directories with
original attributes etc.
Restore a few more files that was missed before.
Restore FRR configuration directory if exists on old system

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Removed deployment_id_asn_map.yml from copy list

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
@yxieca
Copy link
Contributor

yxieca commented Feb 2, 2019

Made to 201811 branch on 2/2/2019

@zhenggen-xu zhenggen-xu deleted the restore-frr-config branch June 7, 2019 19:32
vivekrnv pushed a commit to vivekrnv/sonic-buildimage that referenced this pull request Aug 26, 2022
**What I did**
Replace py-swsssdk with sonic-swss-common

**Why I did it**
To deprecate py-swsssdk, need replace it from code.

**How I verified it**
Pass all UT.

**Details if related**
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Sep 21, 2022
Update sonic-utilities submodule pointer to include the following:
* 0a7557b [minigraph] add option to specify golden path in load_minigraph ([sonic-net#2350](sonic-net/sonic-utilities#2350))
* 322aefc [GCU]Remove GCU unique lane check for duplicate lanes platforms ([sonic-net#2343](sonic-net/sonic-utilities#2343))
* 7099fff [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot ([sonic-net#2286](sonic-net/sonic-utilities#2286))
* 09026ed [warm-reboot] fix warm-reboot when /tmp/cache is missing ([sonic-net#2367](sonic-net/sonic-utilities#2367))
* a3c404c Fix typo in platform_sfputil_helper.is_rj45_port ([sonic-net#2374](sonic-net/sonic-utilities#2374))
* 637d834 Vnet_route_check Vxlan tunnel route update. ([sonic-net#2281](sonic-net/sonic-utilities#2281))
* 29a3e51 Added support for tunnel route status in show vnet routes all. ([sonic-net#2341](sonic-net/sonic-utilities#2341))
* 1ac584b Use 'default' VRF when VRF name is not provided ([sonic-net#2368](sonic-net/sonic-utilities#2368))
* 4d377a6 [subinterface]Added additional checks in portchannel and subinterface commands ([sonic-net#2345](sonic-net/sonic-utilities#2345))
* bbcdf2e disk_check: Publish event  for RO state ([sonic-net#2320](sonic-net/sonic-utilities#2320))
* 3fd537b Support the bandit check by GitHub Action ([sonic-net#2358](sonic-net/sonic-utilities#2358))
* 491d3d3 [generate dump]Added error message when saisdkdump fails ([sonic-net#2356](sonic-net/sonic-utilities#2356))
* 6830e01 [counterpoll]Fixing counterpoll show for tunnel and acl stats ([sonic-net#2355](sonic-net/sonic-utilities#2355))
* 3be2ad7 [fast-reboot]Avoid stopping masked services during fast-reboot ([sonic-net#2335](sonic-net/sonic-utilities#2335))
* 0e1b0cf [GCU] Fix missing backend in dry run ([sonic-net#2347](sonic-net/sonic-utilities#2347))
* 676c31b Add verification for override ([sonic-net#2305](sonic-net/sonic-utilities#2305))
* 48997c2 Add Password Hardening CLI support ([sonic-net#2338](sonic-net/sonic-utilities#2338))
* 414e239 update unit tests for swap ([#locato](https://github.com/sonic-net/sonic-utilities/pull/locato))
* a91a492 consider swap checking memory in ([#stalle](https://github.com/sonic-net/sonic-utilities/pull/stalle))
* f0ce586 [route_check]: Ignore standalone tunnel routes ([sonic-net#2325](sonic-net/sonic-utilities#2325))

Signed-off-by: dprital <drorp@nvidia.com>
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Sep 21, 2022
…e submodule head

linkmgrd:
* 05e5f4c 2022-09-20 | [Active-Active] flaky LinkmgrdBootupSequence unit tests (sonic-net#134) (HEAD -> 202205) [Jing Zhang]
* 16fcadf 2022-09-13 | [active-standby] update warmboot reconciliation logic (sonic-net#129) [Jing Zhang]
* e656a87 2022-09-09 | [active-active] shutdown link prober when starting as isolated (sonic-net#130) [Jing Zhang]

uttilities:
yinxi@ying-dev-vm-01:~/src/sonic-202205/src/sonic-utilities$ git hist github/202205..HEAD
* 562188f 2022-09-14 | Use 'default' VRF when VRF name is not provided (sonic-net#2368) (HEAD -> 202205) [Sumukha Tumkur Vani]
* c50ba4f 2022-09-20 | [minigraph] add option to specify golden path in load_minigraph (sonic-net#2350) [jingwenxie]
* cec5ab2 2022-09-20 | [GCU]Remove GCU unique lane check for duplicate lanes platforms (sonic-net#2343) [jingwenxie]
* 8d20771 2022-09-15 | Vnet_route_check Vxlan tunnel route update. (sonic-net#2281) [siqbal1986]

swss:
* 88371f7 2022-09-21 | [ci] Only when test stage succeeded or succeededwithissues, PR run Gcov (sonic-net#2460) (HEAD -> 202205) [Liu Shilong]
* c11dbd7 2022-09-15 | [QoS] Enforce drop probability only for colors whose WRED are enabled (sonic-net#2422) [Stephen Sun]

sairedis:
* 80928dd 2022-09-06 | [lgtm] Add uuid library (sonic-net#1119) (HEAD -> 202205, github/202205) [Kamil Cudnik]
* c147dd0 2022-09-16 | [202205][vslib]: Add SAI_PORT_ATTR_OPER_SPEED get sonic-net#1123 [Ze Gan]

platform-daemon:
* 9cf8adf 2022-09-21 | [ycabled] add notification for gRPC connection state transitions to  IDLE/TRANSIENT_FAILURE (sonic-net#295) (HEAD -> 202205) [vdahiya12]
* 1e07ae3 2022-09-20 | Use get() to fetch default value from dictionary for port admin_status sonic-net#286 [anamehra]
* 157f483 2022-09-15 | [Xcvrd] Soak duplicate events and process only updated interested events (sonic-net#285) [Prince George]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
liat-grozovik pushed a commit that referenced this pull request Sep 22, 2022
…e submodule head (#12149)

linkmgrd:
* 05e5f4c 2022-09-20 | [Active-Active] flaky LinkmgrdBootupSequence unit tests (#134) (HEAD -> 202205) [Jing Zhang]
* 16fcadf 2022-09-13 | [active-standby] update warmboot reconciliation logic (#129) [Jing Zhang]
* e656a87 2022-09-09 | [active-active] shutdown link prober when starting as isolated (#130) [Jing Zhang]

uttilities:
yinxi@ying-dev-vm-01:~/src/sonic-202205/src/sonic-utilities$ git hist github/202205..HEAD
* 562188f 2022-09-14 | Use 'default' VRF when VRF name is not provided (#2368) (HEAD -> 202205) [Sumukha Tumkur Vani]
* c50ba4f 2022-09-20 | [minigraph] add option to specify golden path in load_minigraph (#2350) [jingwenxie]
* cec5ab2 2022-09-20 | [GCU]Remove GCU unique lane check for duplicate lanes platforms (#2343) [jingwenxie]
* 8d20771 2022-09-15 | Vnet_route_check Vxlan tunnel route update. (#2281) [siqbal1986]

swss:
* 88371f7 2022-09-21 | [ci] Only when test stage succeeded or succeededwithissues, PR run Gcov (#2460) (HEAD -> 202205) [Liu Shilong]
* c11dbd7 2022-09-15 | [QoS] Enforce drop probability only for colors whose WRED are enabled (#2422) [Stephen Sun]

sairedis:
* 80928dd 2022-09-06 | [lgtm] Add uuid library (#1119) (HEAD -> 202205, github/202205) [Kamil Cudnik]
* c147dd0 2022-09-16 | [202205][vslib]: Add SAI_PORT_ATTR_OPER_SPEED get #1123 [Ze Gan]

platform-daemon:
* 9cf8adf 2022-09-21 | [ycabled] add notification for gRPC connection state transitions to  IDLE/TRANSIENT_FAILURE (#295) (HEAD -> 202205) [vdahiya12]
* 1e07ae3 2022-09-20 | Use get() to fetch default value from dictionary for port admin_status #286 [anamehra]
* 157f483 2022-09-15 | [Xcvrd] Soak duplicate events and process only updated interested events (#285) [Prince George]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@wen587 wen587 mentioned this pull request Sep 23, 2022
7 tasks
qiluo-msft pushed a commit that referenced this pull request Oct 1, 2022
0a7557bd9 [minigraph] add option to specify golden path in load_minigraph (#2350)
322aefc37 [GCU]Remove GCU unique lane check for duplicate lanes platforms (#2343)
7099fffa7 [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot (#2286)
09026edbb [warm-reboot] fix warm-reboot when /tmp/cache is missing (#2367)
a3c404c74 Fix typo in platform_sfputil_helper.is_rj45_port (#2374)
637d834ce Vnet_route_check Vxlan tunnel route update. (#2281)
29a3e5180 Added support for tunnel route status in show vnet routes all. (#2341)
1ac584bb3 Use 'default' VRF when VRF name is not provided (#2368)
4d377a620 [subinterface]Added additional checks in portchannel and subinterface commands (#2345)
bbcdf2ed7 disk_check: Publish event  for RO state (#2320)
3fd537b0a Support the bandit check by GitHub Action (#2358)
491d3d380 [generate dump]Added error message when saisdkdump fails (#2356)
6830e01ec [counterpoll]Fixing counterpoll show for tunnel and acl stats (#2355)
3be2ad7de [fast-reboot]Avoid stopping masked services during fast-reboot (#2335)
0e1b0cf20 [GCU] Fix missing backend in dry run (#2347)
676c31bd0 Add verification for override (#2305)
48997c266 Add Password Hardening CLI support (#2338)
414e239ea update unit tests for swap allocator
a91a4922f consider swap checking memory in installer
f0ce58635 [route_check]: Ignore standalone tunnel routes (#2325)
roberthong-qct pushed a commit to QuantaSwitch/sonic-buildimage that referenced this pull request Nov 18, 2022
0a7557bd9 [minigraph] add option to specify golden path in load_minigraph (sonic-net#2350)
322aefc37 [GCU]Remove GCU unique lane check for duplicate lanes platforms (sonic-net#2343)
7099fffa7 [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot (sonic-net#2286)
09026edbb [warm-reboot] fix warm-reboot when /tmp/cache is missing (sonic-net#2367)
a3c404c74 Fix typo in platform_sfputil_helper.is_rj45_port (sonic-net#2374)
637d834ce Vnet_route_check Vxlan tunnel route update. (sonic-net#2281)
29a3e5180 Added support for tunnel route status in show vnet routes all. (sonic-net#2341)
1ac584bb3 Use 'default' VRF when VRF name is not provided (sonic-net#2368)
4d377a620 [subinterface]Added additional checks in portchannel and subinterface commands (sonic-net#2345)
bbcdf2ed7 disk_check: Publish event  for RO state (sonic-net#2320)
3fd537b0a Support the bandit check by GitHub Action (sonic-net#2358)
491d3d380 [generate dump]Added error message when saisdkdump fails (sonic-net#2356)
6830e01ec [counterpoll]Fixing counterpoll show for tunnel and acl stats (sonic-net#2355)
3be2ad7de [fast-reboot]Avoid stopping masked services during fast-reboot (sonic-net#2335)
0e1b0cf20 [GCU] Fix missing backend in dry run (sonic-net#2347)
676c31bd0 Add verification for override (sonic-net#2305)
48997c266 Add Password Hardening CLI support (sonic-net#2338)
414e239ea update unit tests for swap allocator
a91a4922f consider swap checking memory in installer
f0ce58635 [route_check]: Ignore standalone tunnel routes (sonic-net#2325)
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