Merge branch v2.11 into v3.0
This commit is contained in:
commit
c1d9b9ee1f
33 changed files with 602 additions and 159 deletions
|
@ -11,14 +11,15 @@ import (
|
|||
// CheckFile checks file permissions and content size.
|
||||
func CheckFile(name string) (bool, error) {
|
||||
f, err := os.Open(name)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
f, err = os.Create(name)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return false, f.Chmod(0o600)
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
nf, err := os.Create(name)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer nf.Close()
|
||||
return false, nf.Chmod(0o600)
|
||||
}
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
|
|
@ -319,7 +319,7 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI
|
|||
}
|
||||
|
||||
var mach *machine
|
||||
if len(task.Attachments) != 0 {
|
||||
if aws.StringValue(taskDef.NetworkMode) == "awsvpc" && len(task.Attachments) != 0 {
|
||||
if len(container.NetworkInterfaces) == 0 {
|
||||
logger.Error().Msgf("Skip container %s: no network interfaces", aws.StringValue(container.Name))
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue