moby--moby/daemon
Kir Kolyshkin b7a95a3ce4 lcow: fix debug in startServiceVMIfNotRunning()
When go-1.11beta1 is used for building, the following error is
reported:

> 14:56:20 daemon\graphdriver\lcow\lcow.go:236: Debugf format %s reads
> arg #2, but call has 1 arg

While fixing this, let's also fix a few other things in this
very function (startServiceVMIfNotRunning):

1. Do not use fmt.Printf when not required.
2. Use `title` whenever possible.
3. Don't add `id` to messages as `title` already has it.
4. Remove duplicated colons.
5. Try to unify style of messages.
6. s/startservicevmifnotrunning/startServiceVMIfNotRunning/
...

In general, logging/debugging here is a mess and requires much more
love than I can give it at the moment. Areas for improvement:

1. Add a global var logger = logrus.WithField("storage-driver", "lcow")
and use it everywhere else in the code.
2. Use logger.WithField("id", id) whenever possible (same for "context"
and other similar fields).
3. Revise all the errors returned to be uniform.
4. Make use of errors.Wrap[f] whenever possible.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-07-12 13:42:23 -07:00
..
caps lcow: Allow the client to add or remove capabilities 2018-06-15 16:03:33 -07:00
cluster Compile fix 2018-07-11 15:52:19 +02:00
config Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
discovery Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
events Add canonical import comment 2018-02-05 16:51:57 -05:00
exec Fix race condition between exec start and resize 2018-06-08 11:07:48 +08:00
graphdriver lcow: fix debug in startServiceVMIfNotRunning() 2018-07-12 13:42:23 -07:00
images distribution: fix passing platform struct to puller 2018-06-27 14:59:31 -07:00
initlayer Add canonical import comment 2018-02-05 16:51:57 -05:00
links Add canonical import comment 2018-02-05 16:51:57 -05:00
listeners Adapt listeners to upstream API changes in go-systemd 2018-05-23 21:57:30 +02:00
logger loggerutils: build fixes, improve errors 2018-07-11 15:52:25 +02:00
names Add canonical import comment 2018-02-05 16:51:57 -05:00
network Move network conversions out of API router 2018-06-27 17:11:29 -07:00
stats Fix stats collector spinning CPU if no stats are collected 2018-03-15 17:56:15 +01:00
testdata Remove libtrust dep from api 2017-09-06 12:05:19 -04:00
apparmor_default.go Add canonical import comment 2018-02-05 16:51:57 -05:00
apparmor_default_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_tarcopyoptions_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
archive_unix.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
archive_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
attach.go Fix fd leak on attach 2018-05-31 10:11:18 -04:00
auth.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
bindmount_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
changes.go c.RWLayer: check for nil before use 2018-02-09 11:24:09 -08:00
checkpoint.go Add canonical import comment 2018-02-05 16:51:57 -05:00
cluster.go Move network conversions out of API router 2018-06-27 17:11:29 -07:00
commit.go Move all daemon image methods into imageService 2018-02-26 16:48:29 -05:00
configs.go Merge configs/secrets in unix implementation 2018-02-16 11:25:14 -05:00
configs_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
configs_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
container_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
container_operations.go Move network operations out of container package 2018-05-10 17:16:00 -04:00
container_operations_unix.go Don't make container mount unbindable 2018-04-10 15:14:34 -04:00
container_operations_windows.go Move network operations out of container package 2018-05-10 17:16:00 -04:00
container_unix_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
container_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
create.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
create_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
create_unix.go api: add configurable MaskedPaths and ReadOnlyPaths to the API 2018-06-05 12:33:14 -04:00
create_windows.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
daemon.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
daemon_linux.go Merge pull request #36091 from kolyshkin/mount 2018-04-21 11:03:54 +02:00
daemon_linux_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
daemon_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
daemon_unix.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
daemon_unix_test.go Remove old/uneeded volume migration from vers 1.7 2018-04-17 14:06:53 -04:00
daemon_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
daemon_windows.go Remove old/uneeded volume migration from vers 1.7 2018-04-17 14:06:53 -04:00
daemon_windows_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
debugtrap_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
delete.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
delete_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
dependency.go Add canonical import comment 2018-02-05 16:51:57 -05:00
disk_usage.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
errors.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
events.go Image events 2018-02-21 18:26:16 -05:00
events_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
exec.go Fix race condition between exec start and resize 2018-06-08 11:07:48 +08:00
exec_linux.go Fix AppArmor not being applied to Exec processes 2018-03-02 14:05:36 +01:00
exec_linux_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
exec_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
export.go daemon.ContainerExport(): do not panic 2018-03-13 21:24:43 -07:00
health.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
health_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
info.go Remove use of global volume driver store 2018-04-17 14:07:08 -04:00
info_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
info_unix_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
info_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
inspect.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
inspect_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
inspect_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
inspect_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
keys.go Add canonical import comment 2018-02-05 16:51:57 -05:00
keys_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
kill.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
links.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
list_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
list_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
list_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logdrivers_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logdrivers_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logs.go Fix race conditions in logs API 2018-05-14 15:48:32 -04:00
logs_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
metrics.go Move plugin client to separate interface 2018-05-30 15:22:10 -04:00
metrics_unix.go Move plugin client creation to the extension point 2018-05-25 15:18:53 -04:00
metrics_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
monitor.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
mounts.go Extract volume interaction to a volumes service 2018-05-25 14:21:07 -04:00
names.go Add canonical import comment 2018-02-05 16:51:57 -05:00
network.go Update moby to use scalable-lb libnetwork APIs 2018-07-03 13:46:33 -04:00
oci.go lcow: Allow the client to add device cgroup rules 2018-06-15 16:14:17 -07:00
oci_linux.go lcow: Allow the client to add device cgroup rules 2018-06-15 16:14:17 -07:00
oci_linux_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
oci_windows.go lcow: Allow the client to add device cgroup rules 2018-06-15 16:14:17 -07:00
pause.go Add canonical import comment 2018-02-05 16:51:57 -05:00
prune.go Move network conversions out of API router 2018-06-27 17:11:29 -07:00
reload.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
reload_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
reload_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
reload_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
rename.go Add canonical import comment 2018-02-05 16:51:57 -05:00
resize.go Fix race condition between exec start and resize 2018-06-08 11:07:48 +08:00
resize_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
restart.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_disabled.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
seccomp_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
secrets_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
selinux_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
selinux_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
start.go Move ImageService to new package 2018-02-26 16:49:37 -05:00
start_unix.go vendor: update containerd to 63522d9 2018-06-08 19:19:06 -07:00
start_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
stats_collector.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stats_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stop.go daemon.ContainerStop(): fix for a negative timeout 2018-05-03 10:04:33 -07:00
top_unix.go ContainerTop: improve error message 2018-05-24 18:24:36 -07:00
top_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
top_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
trustkey.go Add canonical import comment 2018-02-05 16:51:57 -05:00
trustkey_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
unpause.go daemon/*.go: fix some Wrap[f]/Warn[f] errors 2018-07-11 15:51:51 +02:00
update.go Add canonical import comment 2018-02-05 16:51:57 -05:00
update_linux.go Various code-cleanup 2018-05-23 17:50:54 +02:00
update_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
util_test.go Fix race condition between exec start and resize 2018-06-08 11:07:48 +08:00
volumes.go Fix bindmount autocreate race 2018-07-02 13:42:33 -07:00
volumes_linux.go Use rslave propagation for mounts from daemon root 2018-02-07 14:27:09 -05:00
volumes_linux_test.go Use rslave propagation for mounts from daemon root 2018-02-07 14:27:09 -05:00
volumes_unit_test.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
volumes_unix.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
volumes_unix_test.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00
volumes_windows.go Fix some linting issues 2018-05-17 19:28:27 +02:00
wait.go Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
workdir.go Add canonical import comment 2018-02-05 16:51:57 -05:00