Set network_mode to bridge to overwrite old setting
Previously, the network_mode was only set when creating a job with network_access = false. This results in Nomad leaving this setting as is when updating the job to use network. Thus a job would have had the mapped ports in the Nomad UI, but the Docker network_mode would still be 'none'.
This commit is contained in:

committed by
Tobias Kantusch

parent
5f35ba30a2
commit
3d395f0a38
@@ -192,7 +192,8 @@ func TestConfigureNetworkSetsCorrectValues(t *testing.T) {
|
||||
}
|
||||
|
||||
mode, ok := testTask.Config["network_mode"]
|
||||
assert.False(t, ok && mode == "none")
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, mode, "")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user