Skip to content

Service reload failure due to multiple "--net" args in 'docker create' #4118

@mykolaf

Description

@mykolaf

Description
A few recent changes introduced an issue with restarting services like nat and mgmt-framework.

The reason is diff decided to specify --net separately, while few services still have this

This causes config reload failure.

Steps to reproduce the issue:

  1. Run image with 3856
  2. Do config reload
  3. Observe Job for nat.service failed because the control process exited with error code

Describe the results you received:

Service restart failure
Log:

Feb  6 14:21:31.314088 mtbc-sonic-01-2410 INFO nat.sh[27859]: Creating new nat container with HWSKU ACS-MSN2410
Feb  6 14:21:31.483881 mtbc-sonic-01-2410 INFO nat.sh[27859]: docker: network "host" is specified multiple times.

Describe the results you expected:

Everything running smooth

Additional information you deem important (e.g. issue happens only occasionally):

Originally observed on 201911 release, should also be in master.
Output of show version:

```

SONiC Software Version: SONiC.HEAD.28-d192e0c9
Distribution: Debian 9.11
Kernel: 4.9.0-9-2-amd64
Build commit: d192e0c
Build date: Wed Feb 5 04:39:37 UTC 2020
Built by: johnar@jenkins-worker-8

```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions