Skip to content

Move all minigraph-related action from rc.local to updategraph#1452

Merged
taoyl-ms merged 4 commits intosonic-net:masterfrom
taoyl-ms:taoyl/new_updategraph
Mar 10, 2018
Merged

Move all minigraph-related action from rc.local to updategraph#1452
taoyl-ms merged 4 commits intosonic-net:masterfrom
taoyl-ms:taoyl/new_updategraph

Conversation

@taoyl-ms
Copy link
Copy Markdown
Contributor

@taoyl-ms taoyl-ms commented Mar 3, 2018

- What I did

  1. rc.local no longer do configuration-related stuff. Instead, updategraph service 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.

  2. Reconsider the dependency between services - updategraph is now after database. All feature services are now after and depending on updategraph. That means restarting updategraph will automatically trigger restarting of feature services.

  3. updategraph now supports the scenario of not updating minigraph from data source but only reloading local graph. We plan to adapt to this approach in sonic-utilities config load_minigraph to simplify the code and unify behavior.

@taoyl-ms taoyl-ms requested review from jleveque, lguohan and yxieca March 3, 2018 01:59
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why dhcp_relay requires teamd service?

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.

Portchannels need to be created and up before starting the relay, as the relay agent listens on them.

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.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

4 [](start = 17, length = 1)

can you assign config_dbnum to 4 and use it throughout the script?

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.

Done.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

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.

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.

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.

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

Copy link
Copy Markdown
Collaborator

@lguohan lguohan 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 rebase and resolve the conflict?

@taoyl-ms taoyl-ms force-pushed the taoyl/new_updategraph branch from 6ca5be9 to c8aba9a Compare March 9, 2018 00:57
@taoyl-ms
Copy link
Copy Markdown
Contributor Author

taoyl-ms commented Mar 9, 2018

Done.

@jleveque
Copy link
Copy Markdown
Contributor

jleveque commented Mar 9, 2018

Please see my comment on rc.local regarding the name of the firstboot file.

@taoyl-ms
Copy link
Copy Markdown
Contributor Author

taoyl-ms commented Mar 9, 2018

Modified to /tmp/pending_config_migration and /tmp/pending_config_initialization according to PR comments.

@taoyl-ms taoyl-ms merged commit e84e093 into sonic-net:master Mar 10, 2018
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>

Co-authored-by: wenda.ni <wenda.ni@bytedance.com>
mssonicbld added a commit that referenced this pull request Dec 8, 2024
…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
VladimirKuk pushed a commit to Marvell-switching/sonic-buildimage that referenced this pull request Jan 21, 2025
…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
vmittal-msft pushed a commit to vmittal-msft/sonic-buildimage that referenced this pull request Oct 20, 2025
… 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
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.

3 participants