This passes through the container hostname to HCS, which in Windows Server
2016 TP4 will set the container's hostname in the registry before starting
it. This will be silently ignored by TP3.
Signed-off-by: John Starks <jostarks@microsoft.com>
| ... | ... |
@@ -220,4 +220,5 @@ type Command struct {
|
| 220 | 220 |
FirstStart bool `json:"first_start"` |
| 221 | 221 |
LayerPaths []string `json:"layer_paths"` // Windows needs to know the layer paths and folder for a command |
| 222 | 222 |
LayerFolder string `json:"layer_folder"` |
| 223 |
+ Hostname string `json:"hostname"` // Windows sets the hostname in the execdriver |
|
| 223 | 224 |
} |
| ... | ... |
@@ -72,6 +72,7 @@ type containerInit struct {
|
| 72 | 72 |
LayerFolderPath string // Where the layer folders are located |
| 73 | 73 |
Layers []layer // List of storage layers |
| 74 | 74 |
ProcessorWeight int64 // CPU Shares 1..9 on Windows; or 0 is platform default. |
| 75 |
+ HostName string // Hostname |
|
| 75 | 76 |
} |
| 76 | 77 |
|
| 77 | 78 |
// defaultOwner is a tag passed to HCS to allow it to differentiate between |
| ... | ... |
@@ -102,6 +103,7 @@ func (d *Driver) Run(ctx context.Context, c *execdriver.Command, pipes *execdriv |
| 102 | 102 |
IgnoreFlushesDuringBoot: c.FirstStart, |
| 103 | 103 |
LayerFolderPath: c.LayerFolder, |
| 104 | 104 |
ProcessorWeight: c.Resources.CPUShares, |
| 105 |
+ HostName: c.Hostname, |
|
| 105 | 106 |
} |
| 106 | 107 |
|
| 107 | 108 |
for i := 0; i < len(c.LayerPaths); i++ {
|