I will provide some more details related to the issue I'm facing.
See also the same issue opened in a different project due to error message "Two successive configuration applications from OMS Settings failed – please report issue to github.com/Microsoft/PowerShell-DSC-for-Linux/issues" microsoft/PowerShell-DSC-for-Linux#415
Issue: I'm not able to collect "ContainerLog" data even if my container (Swarm service) produces log rows.
Environment:
Ubuntu Linux as below:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
Docker CE as below:
docker --version
Docker version 17.12.1-ce, build 7390fc6
Configuration: 1 node swarm cluster as below:
docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
l3yzhsv1e32rbaa7gpcn4wczf * ubuntu001 Ready Active Leader
Hardware/virtualization platform: Microsoft Azure
Running services as below:
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
pb5k9j7bbzvq local_reader replicated 1/1 tiian/reader:1.3
l7v9r5c9ekm6 local_writer replicated 1/1 tiian/writer:1.3
gvjxzasi2w9b omsagent global 1/1 microsoft/oms:latest :25225->25225/tcp,:25224->25224/udp
Running containers:
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b7a32f0f0190 tiian/writer:1.3 "/bin/sh -c '/bin/sh…" 39 minutes ago Up 39 minutes local_writer.1.lsl1ob0lm1vilg8rf6iwujdn9
d0d45a2c53ff tiian/reader:1.3 "/bin/sh -c '/bin/sh…" 39 minutes ago Up 38 minutes local_reader.1.6p93rmj18zyohobfsfor9g1zx
55fe8a0ac945 microsoft/oms:latest "/opt/main.sh" 39 minutes ago Up 38 minutes omsagent.l3yzhsv1e32rbaa7gpcn4wczf.vd08221gz40l67sq2ms67y049
Logs produced by the "local_reader" service:
[...]
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:52 UTC 2018 number of lines in file are 4109 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:53 UTC 2018 number of lines in file are 4109 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:54 UTC 2018 number of lines in file are 4110 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:55 UTC 2018 number of lines in file are 4110 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:56 UTC 2018 number of lines in file are 4111 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:57 UTC 2018 number of lines in file are 4111 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:58 UTC 2018 number of lines in file are 4112 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:08:59 UTC 2018 number of lines in file are 4112 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:09:00 UTC 2018 number of lines in file are 4113 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:09:01 UTC 2018 number of lines in file are 4113 /v4/date.txt
local_reader.1.6p93rmj18zyo@ubuntu001 | Thu Jul 5 10:09:02 UTC 2018 number of lines in file are 4114 /v4/date.txt
Logs produced by the "local_writer" service:
[...]
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:15 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:17 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:19 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:21 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:23 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:25 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:27 UTC 2018
local_writer.1.lsl1ob0lm1vi@ubuntu001 | Writing date Thu Jul 5 10:09:29 UTC 2018
OMS agent (swarm service configuration):
docker service inspect omsagent
[
{
"ID": "gvjxzasi2w9buuveqzbdo5ugc",
"Version": {
"Index": 18023
},
"CreatedAt": "2018-06-29T10:26:35.619912541Z",
"UpdatedAt": "2018-07-05T09:29:04.054650027Z",
"Spec": {
"Name": "omsagent",
"Labels": {},
"TaskTemplate": {
"ContainerSpec": {
"Image": "microsoft/oms:latest@sha256:6844e0798d7c943a4f95e545fffd05f43917ef72e31a53b3fcdfeb5b067b5202",
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Target": "/var/run/docker.sock"
}
],
"StopGracePeriod": 10000000000,
"DNSConfig": {},
"Secrets": [
{
"File": {
"Name": "WSID",
"UID": "0",
"GID": "0",
"Mode": 292
},
"SecretID": "yberlz1cp9hubeaos0rxbzxh7",
"SecretName": "WSID"
},
{
"File": {
"Name": "KEY",
"UID": "0",
"GID": "0",
"Mode": 292
},
"SecretID": "nh5seunun4ly2ib794terckdm",
"SecretName": "KEY"
}
],
"Isolation": "default"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "on-failure",
"Delay": 5000000000,
"MaxAttempts": 0
},
"Placement": {
"Platforms": [
{
"Architecture": "amd64",
"OS": "linux"
}
]
},
"ForceUpdate": 1,
"Runtime": "container"
},
"Mode": {
"Global": {}
},
"UpdateConfig": {
"Parallelism": 1,
"FailureAction": "pause",
"Monitor": 5000000000,
"MaxFailureRatio": 0,
"Order": "stop-first"
},
"RollbackConfig": {
"Parallelism": 1,
"FailureAction": "pause",
"Monitor": 5000000000,
"MaxFailureRatio": 0,
"Order": "stop-first"
},
"EndpointSpec": {
"Mode": "vip",
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 25225,
"PublishedPort": 25225,
"PublishMode": "ingress"
},
{
"Protocol": "udp",
"TargetPort": 25224,
"PublishedPort": 25224,
"PublishMode": "ingress"
}
]
}
},
"PreviousSpec": {
"Name": "omsagent",
"Labels": {},
"TaskTemplate": {
"ContainerSpec": {
"Image": "microsoft/oms:latest@sha256:6844e0798d7c943a4f95e545fffd05f43917ef72e31a53b3fcdfeb5b067b5202",
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Target": "/var/run/docker.sock"
}
],
"DNSConfig": {},
"Secrets": [
{
"File": {
"Name": "WSID",
"UID": "0",
"GID": "0",
"Mode": 292
},
"SecretID": "yberlz1cp9hubeaos0rxbzxh7",
"SecretName": "WSID"
},
{
"File": {
"Name": "KEY",
"UID": "0",
"GID": "0",
"Mode": 292
},
"SecretID": "nh5seunun4ly2ib794terckdm",
"SecretName": "KEY"
}
],
"Isolation": "default"
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "on-failure",
"Delay": 5000000000,
"MaxAttempts": 0
},
"Placement": {
"Platforms": [
{
"Architecture": "amd64",
"OS": "linux"
}
]
},
"ForceUpdate": 0,
"Runtime": "container"
},
"Mode": {
"Global": {}
},
"EndpointSpec": {
"Mode": "vip",
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 25225,
"PublishedPort": 25225,
"PublishMode": "ingress"
},
{
"Protocol": "udp",
"TargetPort": 25224,
"PublishedPort": 25224,
"PublishMode": "ingress"
}
]
}
},
"Endpoint": {
"Spec": {
"Mode": "vip",
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 25225,
"PublishedPort": 25225,
"PublishMode": "ingress"
},
{
"Protocol": "udp",
"TargetPort": 25224,
"PublishedPort": 25224,
"PublishMode": "ingress"
}
]
},
"Ports": [
{
"Protocol": "tcp",
"TargetPort": 25225,
"PublishedPort": 25225,
"PublishMode": "ingress"
},
{
"Protocol": "udp",
"TargetPort": 25224,
"PublishedPort": 25224,
"PublishMode": "ingress"
}
],
"VirtualIPs": [
{
"NetworkID": "m0x6kvjcgc563uv81zqyz1260",
"Addr": "10.255.0.5/16"
}
]
},
"UpdateStatus": {
"State": "completed",
"StartedAt": "2018-07-04T12:19:34.301759207Z",
"CompletedAt": "2018-07-04T12:19:47.081110853Z",
"Message": "update completed"
}
}
]
Why "ContainerLog" are not collected?
How can I troubleshoot the issue and provide more info?
Kind Regards
Ch.F.