add multi-instance Queue Managers (#307)
* Initial code to implement multi-instance queue manager * alter default mqsc to prevent race between listeners on standby startup * Updates to multi-instance queue manager code * initial multi instance test * Multi-instance code improvements * Multi instance fixes and first test * configure queue manager * Add mirror log filtering for mult-instance QMs * Add log message for multi-instance enabled * Improvements to container runtime logging * refactor test * Test active standby switch * Improve createQueueManager function * Test multi instance race * wait * multi instance mount tests * skip race test * mount tests * no mount test * single instance split mount tests * readiness check * More updates for handling standby queue manager * Improve standby checks * Minor fixes to miqm * Fix logging of JSON errors * Update copyrights * Fix log includes
This commit is contained in:
committed by
Arthur Barr
parent
63af43f19d
commit
6c72c894f7
@@ -398,6 +398,14 @@ func stopContainer(t *testing.T, cli *client.Client, ID string) {
|
||||
}
|
||||
}
|
||||
|
||||
func killContainer(t *testing.T, cli *client.Client, ID string, signal string) {
|
||||
t.Logf("Killing container: %v", ID)
|
||||
err := cli.ContainerKill(context.Background(), ID, signal)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func getExitCodeFilename(t *testing.T) string {
|
||||
return t.Name() + "ExitCode"
|
||||
}
|
||||
@@ -522,6 +530,9 @@ func waitForReady(t *testing.T, cli *client.Client, ID string) {
|
||||
if rc == 0 {
|
||||
t.Log("MQ is ready")
|
||||
return
|
||||
} else if rc == 10 {
|
||||
t.Log("MQ Readiness: Queue Manager Running as Standby")
|
||||
return
|
||||
}
|
||||
case <-ctx.Done():
|
||||
t.Fatal("Timed out waiting for container to become ready")
|
||||
@@ -557,17 +568,17 @@ func removeNetwork(t *testing.T, cli *client.Client, ID string) {
|
||||
}
|
||||
}
|
||||
|
||||
func createVolume(t *testing.T, cli *client.Client) types.Volume {
|
||||
func createVolume(t *testing.T, cli *client.Client, name string) types.Volume {
|
||||
v, err := cli.VolumeCreate(context.Background(), volume.VolumesCreateBody{
|
||||
Driver: "local",
|
||||
DriverOpts: map[string]string{},
|
||||
Labels: map[string]string{},
|
||||
Name: t.Name(),
|
||||
Name: name,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Logf("Created volume %v", t.Name())
|
||||
t.Logf("Created volume %v", v.Name)
|
||||
return v
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user