Skip to content

Commit

Permalink
Merge pull request #527 from srl-labs/fix-ceos-startupcfg
Browse files Browse the repository at this point in the history
fix variable shadowing in ceos startup cfg templating
  • Loading branch information
hellt authored Jul 19, 2021
2 parents cb0d480 + 6c22fff commit 97e0ef3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/rn/0.15.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ With that in mind we launched the containerlab's own [discord server](https://di
* Fixed directories creation for `ignite` runtimes
* Fixed release notes links in `containerlab version` command

### 0.15.2
* Fixed startup-config provisioning for ceos nodes [#526](https://github.com/srl-labs/containerlab/issues/526)

[^1]: as opposed to a VM-way by running Cumulus with [vrnetlab](../manual/vrnetlab.md)
[^2]: both with `ignite` runtime or `docker` runtime
[^3]: starting with SR Linux 21.3, the license file is optional
5 changes: 3 additions & 2 deletions nodes/ceos/ceos.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ func createCEOSFiles(node *types.NodeConfig) error {
if err != nil {
return err
}
cfgTemplate = string(c)
tpl := string(c)

err = node.GenerateConfig(node.ResStartupConfig, cfgTemplate)
err = node.GenerateConfig(node.ResStartupConfig, tpl)
if err != nil {
return err
}
Expand All @@ -146,6 +146,7 @@ func ceosPostDeploy(ctx context.Context, r runtime.ContainerRuntime, nodeCfg *ty
if nodeCfg.StartupConfig != "" {
return nil
}

// regenerate ceos config since it is now known which IP address docker assigned to this container
err := nodeCfg.GenerateConfig(nodeCfg.ResStartupConfig, cfgTemplate)
if err != nil {
Expand Down

0 comments on commit 97e0ef3

Please sign in to comment.