Skip to content

Commit

Permalink
Allow for OomScoreAdj
Browse files Browse the repository at this point in the history
Signed-off-by: plaurent <[email protected]>
  • Loading branch information
psaintlaurent committed Jun 27, 2024
1 parent f738c98 commit ef69fb9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/reference/commandline/service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Create a new service
| `--name` | `string` | | Service name |
| [`--network`](#network) | `network` | | Network attachments |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK |
| `--oom-score-adj` | `int64` | `0` | oom score adjustment (-1000 to 1000) |
| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms |
| [`--placement-pref`](#placement-pref) | `pref` | | Add a placement preference |
| [`-p`](#publish), [`--publish`](#publish) | `port` | | Publish a port as a node port |
Expand Down
1 change: 1 addition & 0 deletions docs/reference/commandline/service_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Update a service
| `--network-rm` | `list` | | Remove a network |
| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK |
| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms |
| `--oom-score-adj` | `int64` | `0` | oom score adjustment (-1000 to 1000) |
| `--placement-pref-add` | `pref` | | Add a placement preference |
| `--placement-pref-rm` | `pref` | | Remove a placement preference |
| [`--publish-add`](#publish-add) | `port` | | Add or update a published port |
Expand Down
5 changes: 2 additions & 3 deletions opts/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,8 @@ func (o *OomScoreAdj) String() string {
}

func (o *OomScoreAdj) Set(value string) error {

var conv int64
conv, _ = strconv.ParseInt(value, 10, 64)
conv, err := strconv.ParseInt(value, 10, 64)
*o = OomScoreAdj(conv)
return nil
return err
}
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory
github.com/docker/distribution/uuid
github.com/docker/docker v27.0.1-rc.1.0.20240621131212-ff1e2c0de72a+incompatible
# github.com/docker/docker v27.0.1-rc.1.0.20240621131212-ff1e2c0de72a+incompatible
## explicit
github.com/docker/docker/api
github.com/docker/docker/api/types
Expand Down

0 comments on commit ef69fb9

Please sign in to comment.