Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Nov 22, 2021
1 parent 3975477 commit 8ca32b7
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ rpm/*
dist
private
clab-*
clab/.*.yaml
clab/.*.yml

# Test binary, built with `go test -c`
*.test
Expand Down
29 changes: 21 additions & 8 deletions docs/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ Everybody is welcome to join and chat with our community members about all thing
## In The Media
We are always happy to showcase containerlab and demonstrate its powers. Luckily, the network engineering community has lots of events worldwide, and we participated in some. Below you will find recordings of containerlab talks in different formats and on various venues listed in reverse chronological order[^1].

### Containerlab Makes Container And VM Networking Labs Easy
<small>:material-podcast: Podcast · [Packet Pushers](https://packetpushers.net/podcast/tech-bytes-containerlab-makes-container-and-vm-networking-labs-easy-sponsored/) · :material-calendar: 2021-11-15</small>
### Packet Pushers Tech Bytes
<small>:material-podcast: [Containerlab Makes Container And VM Networking Labs Easy](https://packetpushers.net/podcast/tech-bytes-containerlab-makes-container-and-vm-networking-labs-easy-sponsored/) · :material-calendar: 2021-11-15</small>

A short, 14 minutes long introductory talk about Containerlab. If you wanted to know what containerlab is, but all you have is 15 minutes break - go check it out.

<div class="iframe-audio2-container">
<iframe width="320" height="30" src="https://packetpushers.net/?powerpress_embed=52038-podcast&amp;powerpress_player=mediaelement-audio" frameborder="0" scrolling="no"></iframe>
</div>

Participants: [:material-twitter:][rdodin-twitter][:material-linkedin:][rdodin-linkedin] Roman Dodin

### Containerlab - running networking labs with Docker UX
<small>:material-youtube: Screencast · [NANOG 83](https://www.youtube.com/watch?v=qigCla1qY3k) · :material-calendar: 2021-11-03</small>
### NANOG 83
<small>:material-youtube: [Containerlab - running networking labs with Docker UX](https://www.youtube.com/watch?v=qigCla1qY3k) · :material-calendar: 2021-11-03</small>

Our very first NANOG appearance and we went full-steam there. This talk is the most comprehensive containerlab tutorial captured to that date. It starts with the basics and escalates to the [advanced DC fabric deployment](https://youtu.be/qigCla1qY3k?t=2131) with HA telemetry cluster created. All driven by a single containerlab topology file.

Expand All @@ -33,8 +35,8 @@ Participants:
* [:material-twitter:][rdodin-twitter][:material-linkedin:][rdodin-linkedin] Roman Dodin
* [:material-linkedin:][karim-linkedin] Karim Radhouani

### Containerlab - a Modern way to Deploy Networking Topologies for Labs, CI, and Testing
<small>:material-youtube: Screencast · [Open Networking & Edge Summit 2021](https://www.youtube.com/watch?v=snQTlFahY1c) · :material-calendar: 2021-10-11</small>
### Open Networking & Edge Summit 2021
<small>:material-youtube: [Containerlab - a Modern way to Deploy Networking Topologies for Labs, CI, and Testing](https://www.youtube.com/watch?v=snQTlFahY1c) · :material-calendar: 2021-10-11</small>

This 30mins screencast introduces containerlab by going through a multivendor lab example consisting of Nokia SR Linux, Arista cEOS, and GoBGP containers participating in a route reflection scenario.

Expand All @@ -46,8 +48,8 @@ The talk starts with the reasoning as to why containerlab development was warran

Participants: [:material-twitter:][rdodin-twitter][:material-linkedin:][rdodin-linkedin] Roman Dodin

### Containerlab at NLNOG 2021
<small>:material-youtube: Screencast · [NLNOG 2021](https://www.youtube.com/watch?v=n81Tc1g4W5U) · :material-calendar: 2021-09-05</small>
### NLNOG 2021
<small>:material-youtube: [Running networking labs with Docker User Experience](https://www.youtube.com/watch?v=n81Tc1g4W5U) · :material-calendar: 2021-09-05</small>

The first public talk around containerlab happened in the Netherlands at an in-person (sic!) networking event NLNOG 2021.

Expand All @@ -57,6 +59,17 @@ The first public talk around containerlab happened in the Netherlands at an in-p

Participants: [:material-twitter:][rdodin-twitter][:material-linkedin:][rdodin-linkedin] Roman Dodin

### Modem Podcast s01e10
<small>:material-youtube: [Containerlab: Declarative network labbing](https://www.modem.show/post/s01e10/) · :material-calendar: 2021-06-06</small>

Building large-scale network labs can be tedious and error prone—More importantly, they can be notoriously hard to spin up automatically. Containerlab is a new tool that promises to “redefine the way you run networking labs” and I really think it hits that target. On this episode of the Modulate Demodulate podcast, Nick and Chris C. are joined by Roman Dodin, one of the brains behind Containerlab.

<div class="iframe-audio-container">
<iframe src="https://anchor.fm/modulate-demodulate/embed/episodes/Containerlab-Declarative-Network-Labbing-with-Roman-Dodin-e129cuc/a-a5q33b1" height="102px" width="400px" frameborder="0" scrolling="no"></iframe>
</div>

Participants: [:material-twitter:][rdodin-twitter][:material-linkedin:][rdodin-linkedin] Roman Dodin

[rdodin-twitter]: https://twitter.com/ntdvps
[rdodin-linkedin]: https://linkedin.com/in/rdodin
[karim-linkedin]: https://www.linkedin.com/in/karim-radhouani/
Expand Down
1 change: 0 additions & 1 deletion docs/lab-examples/templated01.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ The `configure.sh` script relies on [gomplate](https://docs.gomplate.ca) and [gn
[topofile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab.gotmpl
[topovarfile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab_vars.yaml

[^1]: Resource requirements are provisional. Consult with SR Linux Software Installation guide for additional information.

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/hellt/drawio-js@main/embed2.js" async></script>
1 change: 0 additions & 1 deletion docs/lab-examples/templated02.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ bash configure.sh
[topofile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab.gotmpl
[topovarfile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab_vars.yaml

[^1]: Resource requirements are provisional. Consult with SR Linux Software Installation guide for additional information.

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/hellt/drawio-js@main/embed2.js" async></script>
33 changes: 33 additions & 0 deletions docs/rn/0.20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Release 0.20
:material-calendar: 2021-11-17

## Templated topologies
In [#658](https://github.com/srl-labs/containerlab/pull/658) @karimra added support for templated topologies. This feature allows users to generate topology files based on the variables defined in a file. With templates, users can create a template once and then deploy different flavors of the topologies by using variables files, which are naturally smaller and way more human-readable.

Check the [lab examples](../manual/topo-def-file.md#generated-topologies) for addition details.

## Limiting CPU and Memory resources for nodes
In [#679](https://github.com/srl-labs/containerlab/pull/679) @karimra adds resource limitation capabilities for the nodes. It is possible to limit the amount of available [CPU](../manual/nodes.md#cpu), [Memory](../manual/nodes.md#memory) and [allocate specific cores](../manual/nodes.md#cpu-set) to the nodes.

## Containerlab in the media
Containerlab has recently been vocal in the network engineering community by participating in various podcasts and conferences. Don't worry if you missed some, now we have every notable material aggregated [In The Media](../community.md#in-the-media) section.

For example, here is our [NANOG83 talk](../community.md):

<div class="iframe-container">
<iframe width="100%" src="https://www.youtube.com/embed/qigCla1qY3k" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

## Miscellaneous

* Ignite runtime support for containerized clab execution ([#670](https://github.com/srl-labs/containerlab/pull/670))
* Containerlab' config engine will not error on the nodes for which credentials were not found ([#675](https://github.com/srl-labs/containerlab/pull/675))
* SONiC boot will not block in case of failures ([#678](https://github.com/srl-labs/containerlab/pull/678))

## Patches

### 0.20.1
* Fix panic when copy files ([#684](https://github.com/srl-labs/containerlab/pull/684))

## New contributors
Welcome [@LimeHat](https://github.com/LimeHat), and thank you for your contributions to containerlab!
28 changes: 28 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,32 @@
left: 0;
width: 100%;
height: 100%;
}
/* this is for anchor.fm iframes */
.iframe-audio-container {
position: relative;
width: 100%;
padding-bottom: 7rem;
height: 0;
}
.iframe-audio-container iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
/* this is for low-height iframe audio containers */
.iframe-audio2-container {
position: relative;
width: 100%;
padding-bottom: 2rem;
height: 0;
}
.iframe-audio2-container iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/awalterschulze/gographviz v2.0.1+incompatible
github.com/cloudflare/cfssl v1.4.1
github.com/containerd/containerd v1.5.7
github.com/containerd/containerd v1.5.8
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.9.1
github.com/digitalocean/go-openvswitch v0.0.0-20201214180534-ce0f183468d8
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
cloud.google.com/go/storage v1.16.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/Microsoft/hcsshim v0.8.21 // indirect
github.com/Microsoft/hcsshim v0.8.23 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 // indirect
github.com/Shopify/ejson v1.3.0 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
Expand All @@ -65,7 +65,7 @@ require (
github.com/containerd/fifo v1.0.0 // indirect
github.com/containerd/go-cni v1.0.2 // indirect
github.com/containerd/go-runc v1.0.0 // indirect
github.com/containerd/ttrpc v1.0.2 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/containers/image v3.0.2+incompatible // indirect
github.com/coreos/go-iptables v0.5.0 // indirect
Expand Down Expand Up @@ -133,7 +133,7 @@ require (
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/nightlyone/lockfile v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.0.2 // indirect
github.com/opencontainers/selinux v1.8.2 // indirect
github.com/otiai10/copy v1.1.1 // indirect
Expand Down
20 changes: 12 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg3
github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600=
github.com/Microsoft/hcsshim v0.8.21 h1:btRfUDThBE5IKcvI8O8jOiIkujUsAMBSRsYDYmEi6oM=
github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4=
github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M=
github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg=
github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
Expand Down Expand Up @@ -261,6 +261,7 @@ github.com/carlmontanari/difflibgo v0.0.0-20210718170140-424f52054f94/go.mod h1:
github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs=
github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M=
github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4=
Expand Down Expand Up @@ -321,13 +322,13 @@ github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX
github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ=
github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU=
github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI=
github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s=
github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g=
github.com/containerd/containerd v1.5.7 h1:rQyoYtj4KddB3bxG6SAqd4+08gePNyJjRqvOIfV3rkM=
github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c=
github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw=
github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
Expand Down Expand Up @@ -368,8 +369,9 @@ github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDG
github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8=
github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
github.com/containerd/ttrpc v1.0.2 h1:2/O3oTZN36q2xRolk0a2WWGgh7/Vf/liElg5hFYLX9U=
github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y=
github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI=
github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ=
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk=
github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg=
Expand Down Expand Up @@ -451,8 +453,9 @@ github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.6+incompatible h1:oXI3Vas8TI8Eu/EjH4srKHJBVqraSzJybhxY7Om9faQ=
github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo=
github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
Expand Down Expand Up @@ -1209,8 +1212,9 @@ github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ nav:
- Leaf-spine topology: lab-examples/templated01.md
- 5-stage Clos topology: lab-examples/templated02.md
- Release notes:
- "0.20": rn/0.20.md
- 0.19: rn/0.19.md
- 0.18: rn/0.18.md
- 0.17: rn/0.17.md
Expand Down
14 changes: 7 additions & 7 deletions utils/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ func CopyFile(src, dst string, mode os.FileMode) (err error) {
if !os.IsNotExist(err) {
return err
}
}

if !(dfi.Mode().IsRegular()) {
return fmt.Errorf("file copy failed: destination file %s (%q): %w", dfi.Name(), dfi.Mode().String(), errNonRegularFile)
}
} else {
if !(dfi.Mode().IsRegular()) {
return fmt.Errorf("file copy failed: destination file %s (%q): %w", dfi.Name(), dfi.Mode().String(), errNonRegularFile)
}

if sfi != nil && os.SameFile(sfi, dfi) {
return nil
if sfi != nil && os.SameFile(sfi, dfi) {
return nil
}
}

return CopyFileContents(src, dst, mode)
Expand Down

0 comments on commit 8ca32b7

Please sign in to comment.