Closed jdef closed 6 years ago
make test
fails for me because of some GoString
related test. Suspect a bug in gogo/protobuf. I hacked the test to output the result of the GoString
func that failed to parse:
--- FAIL: TestEvent_TaskUpdatedGoString (0.00s)
masterpb_test.go:7963: failed to parse &master.Event_TaskUpdated{FrameworkID: mesos.FrameworkID{Value: "CW0R6JWXGjhG3m3pAnAbJV0jG7DTCYQvCekLB5zY0FxUZa6N8JzsTMxQyffu",
},
Status: mesos.TaskStatus{TaskID: mesos.TaskID{Value: "0g2LMJZn5Nmp9rhboWMBvMfvJDMEGJ0q4UpS5tjBVCB3FuDclnFoTG3HsJH57ufYnZ3nQzz7COA4",
},
State: func(v mesos.TaskState) *mesos.TaskState { return &v } ( 5 ),
Message: func(v string) *string { return &v } ( "6G44Yqd" ),
Source: func(v mesos.TaskStatus_Source) *mesos.TaskStatus_Source { return &v } ( 1 ),
Reason: func(v mesos.TaskStatus_Reason) *mesos.TaskStatus_Reason { return &v } ( 20 ),
ExecutorID: &mesos.ExecutorID{Value: "FlRaWodJlx61RG5k3NjbS3bOFGFKiqvR4R8yWOdRMkgJNmbQ9BhtGXEIHOw",
},
Timestamp: func(v float64) *float64 { return &v } ( 0.1795823327242275 ),
Healthy: func(v bool) *bool { return &v } ( false ),
CheckStatus: &mesos.CheckStatusInfo{Type: func(v mesos.CheckInfo_Type) *mesos.CheckInfo_Type { return &v } ( 2 ),
Command: &mesos.CheckStatusInfo_Command{ExitCode: func(v int32) *int32 { return &v } ( -69695686 ),
},
HTTP: &mesos.CheckStatusInfo_Http{StatusCode: func(v uint32) *uint32 { return &v } ( 0x95f985dc ),
},
},
Labels: &mesos.Labels{Labels: []mesos.Label{mesos.Label{Key:"tBGAfISwYn3XJusiJitNyQSZlnTBg", Value:(*string)(0xc42015c600)}, mesos.Label{Key:"EiJHST1g4QWQeYDPGaCHmsPtRzq27ZMznvMLGfoQd20c9oLC5i2UqDi
mc8oPnI3nhWFvzK1ui", Value:(*string)(0xc42015c620)}, mesos.Label{Key:"qPSxKCnx1UW6uSjUkeaBkK", Value:(*string)(0xc42015c630)}, mesos.Label{Key:"tydcu0owgtFNChnDhlO95bjonwijuOkcqsBY2ZmS0rWcLdQNce8D4qWompMDeHrStSkgC
JpBKEa", Value:(*string)(0xc42015c640)}},
},
UnreachableTime: &mesos.TimeInfo{Nanoseconds: -5095539703890242531,
},
},
State: func(v master.mesos.TaskState) *master.mesos.TaskState { return &v } ( 1 ),
}
panic: 24:8: expected expression (and 3 more errors) [recovered]
panic: 24:8: expected expression (and 3 more errors)
goroutine 341 [running]:
testing.tRunner.func1(0xc42014d6c0)
/usr/local/go-1.8.1/src/testing/testing.go:622 +0x55f
panic(0xc50620, 0xc4203ff320)
/usr/local/go-1.8.1/src/runtime/panic.go:489 +0x2f0
github.com/mesos/mesos-go/api/v1/lib/master.TestEvent_TaskUpdatedGoString(0xc42014d6c0)
/home/vagrant/mesos-go-workspace/src/github.com/mesos/mesos-go/api/v1/lib/master/masterpb_test.go:7964 +0x517
testing.tRunner(0xc42014d6c0, 0xcb4db0)
/usr/local/go-1.8.1/src/testing/testing.go:657 +0x108
created by testing.(*T).Run
/usr/local/go-1.8.1/src/testing/testing.go:697 +0x544
FAIL github.com/mesos/mesos-go/api/v1/lib/master 4.348s
The (generated, then hacked) test case is:
func TestEvent_TaskUpdatedGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedEvent_TaskUpdated(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Errorf("failed to parse %s", s1) // I added this to see what GoString was returning
panic(err) // fails the test
}
}
I've been testing the "attach container" API with an interactive bash
shell. Couple of problems observed so far:
when running msh
without the -pod
flag bash
generates warnings at startup
2017/08/30 20:18:57 status update from agent "4849630d-c04b-4ae5-9659-9f40aeab5fd2-S0": TASK_RUNNING
2017/08/30 20:18:57 attaching for interactive session to agent "4849630d-c04b-4ae5-9659-9f40aeab5fd2-S0" container "d340b90d-d733-4c67-b909-67a0488759e7"
original window size is 213 x 48
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
intermittent task (I/O switchboard) failures when attaching to the container (several related logs follow, ignore the tiimestamp skew - logs were sampled from several test runs. the errors are the same across failed runs)
2017/08/30 20:15:05 status update from agent "4849630d-c04b-4ae5-9659-9f40aeab5fd2-S1": TASK_RUNNING
2017/08/30 20:15:05 attaching for interactive session to agent "4849630d-c04b-4ae5-9659-9f40aeab5fd2-S1" container "9f9d833f-ff32-4943-a397-f2eba78b4448"
original window size is 213 x 48
2017/08/30 20:15:05 attached input stream error Post http://10.2.0.5:5051/api/v1: context canceled
2017/08/30 20:15:05 Exiting because task 20170830T201505Z is in an unexpected state TASK_FAILED with reason REASON_COMMAND_EXECUTOR_FAILED from source SOURCE_EXECUTOR with message 'Command terminated with signal Window changed'
2017/08/30 20:15:05 exit code 3
slave logs:
E0830 18:46:35.124127 2119 switchboard.cpp:902] Unexpected termination of I/O switchboard server: 'IOSwitchboard' exited with status 1 for container 24a90359-b0e4-4c0a-9051-e6552811ae22.9ad1023b-cb7a-45fc-8053-dc
a0e888c9d3
container stderr:
$ cat /var/lib/mesos/slaves/4849630d-c04b-4ae5-9659-9f40aeab5fd2-S1/frameworks/93c06854-b91a-4f8d-86b4-cdf1cc628613-0101/executors/msh_20170830T184634Z/runs/latest/containers/9ad1023b-cb7a-45fc-8053-dca0e888c9d3/stderr
The io switchboard server failed: Failed redirecting stdout: Input/output error
container stdout:
$ cat /var/lib/mesos/slaves/4849630d-c04b-4ae5-9659-9f40aeab5fd2-S1/frameworks/93c06854-b91a-4f8d-86b4-cdf1cc628613-0101/executors/msh_20170830T184634Z/runs/latest/containers/9ad1023b-cb7a-45fc-8053-dca0e888c9d3/stdout
Executing pre-exec command '{"arguments":["mesos-containerizer","mount","--help=false","--operation=make-rslave","--path=\/"],"shell":false,"value":"\/usr\/libexec\/mesos\/mesos-containerizer"}'
There are (currently) a number of open MESOS tickets related to container attachment: https://issues.apache.org/jira/browse/MESOS-7103
updated 1.2.x protobufs
refactored client, encoding, httpcli, recordio packages to account for v1 protocol changes in 1.2.x
updated and enhanced examples
fixes #300, #310