Move all minigraph-related action from rc.local to updategraph#1452
Move all minigraph-related action from rc.local to updategraph#1452taoyl-ms merged 4 commits intosonic-net:masterfrom
Conversation
There was a problem hiding this comment.
why dhcp_relay requires teamd service?
There was a problem hiding this comment.
Portchannels need to be created and up before starting the relay, as the relay agent listens on them.
There was a problem hiding this comment.
Because it needs to listen on port channels. Please note that this was the original behavior and I didn't change it in this PR.
There was a problem hiding this comment.
4 [](start = 17, length = 1)
can you assign config_dbnum to 4 and use it throughout the script?
files/image_config/platform/rc.local
Outdated
There was a problem hiding this comment.
firstboot [](start = 19, length = 9)
why do we need this firstboot, can updategraph check the /etc/sonic/old_config directory for it to pick up the minigraph or config_db from that directory?
There was a problem hiding this comment.
The plan is to keep /etc/sonic/old_config folder there and not to delete it after first boot for easy debugging. Therefore we need a flag to mark whether it is the first boot.
There was a problem hiding this comment.
I feel like the file name firstboot is confusing because we also reference /host/image-$sonic_version/platform/firsttime in this file, which is also used to determine whether it's the initial boot.
Can we give this file a more specific name based on its application?
Also, I personally think firstboot is a better name for /host/image-$sonic_version/platform/firsttime
lguohan
left a comment
There was a problem hiding this comment.
can you rebase and resolve the conflict?
6ca5be9 to
c8aba9a
Compare
|
Done. |
|
Please see my comment on rc.local regarding the name of the |
|
Modified to |
Signed-off-by: Wenda Ni <wonda.ni@gmail.com> Co-authored-by: wenda.ni <wenda.ni@bytedance.com>
…tically (#21085) #### Why I did it src/sonic-sairedis ``` * 92322be7 - (HEAD -> master, origin/master, origin/kperumal_202411, origin/HEAD, origin/202411) Update the Azure Pipeline build to use Bookworm (#1452) (29 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog
…tically (sonic-net#21085) #### Why I did it src/sonic-sairedis ``` * 92322be7 - (HEAD -> master, origin/master, origin/kperumal_202411, origin/HEAD, origin/202411) Update the Azure Pipeline build to use Bookworm (sonic-net#1452) (29 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog
… HEAD automatically (sonic-net#1452) #### Why I did it src/sonic-linux-kernel ``` * f60c881 - (HEAD -> 202503, origin/202503) Merge pull request sonic-net#52 from mssonicbld/sonicbld/202503-merge (23 hours ago) [mssonicbld] * 5c68aac - Merge branch '202412' of https://github.com/Azure/sonic-linux-kernel.msft into 202503 (23 hours ago) [Sonic Automation] * 9f5eafd - (origin/HEAD, origin/202412, 202412) Ignore table if the EFI memory attributes are corrupt (sonic-net#51) (2 days ago) [mssonicbld] * c47cdc3 - Merge pull request sonic-net#50 from mssonicbld/sonicbld/202412-merge (2 days ago) [mssonicbld] * a1957f1 - Merge branch '202411' of https://github.com/sonic-net/sonic-linux-kernel into 202412 (2 days ago) [Sonic Automation] * 84db3a0 - Fix slave container used for 202411 branch (sonic-net#504) (2 days ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog
- What I did
rc.localno longer do configuration-related stuff. Instead,updategraphservice now has the functionality to support first-time boot configuration behavior. The detail behavior is that-- For pure new installation, generate configuration from default minigraph if updategraph is not enabled during build time; attempt to configure through DHCP if updategraph is enabled.
-- For sonic version upgrade, generate configuration from minigraph on old system if updategraph is enabled during build time; use old configDB content if not enabled.
Reconsider the dependency between services -
updategraphis now afterdatabase. All feature services are now after and depending onupdategraph. That means restartingupdategraphwill automatically trigger restarting of feature services.updategraphnow supports the scenario of not updating minigraph from data source but only reloading local graph. We plan to adapt to this approach in sonic-utilitiesconfig load_minigraphto simplify the code and unify behavior.