Rosco "bake" AMI problem


#1

Hi all,

I run into a weird problem. I have 2 applications A and B. If i start bake AMI on application A, then start bake AMI on application B. The bake process of application A will be terminated without showing any errors. I mean there is only one bake process running at one time

Got the same behavior when bake 2 AMI in 2 different pipeline in one application.
I know Spinnaker use Rosco to wrap packer to build AMI and this is my packer-ami.json

{
  "variables": {
    "ansible_home": "/opt/ansible",
    "playbooks_home": "/opt/ansible/playbooks",
    "sftp_path": "/usr/libexec/openssh",
    "secret_path": "/root/secret",
    "datacenter": "stg",
    "vpc_id": "vpc-xxx",
    "subnet_id": "subnet-xxx",
    "instance_type": "m5.large",
    "default_repository": "releases",
    "enable_datadog": "false",
    "root_volume_size": "20",
    "extra_volume_size": "20",
    "component": "",
    "version": ""
  },
  "builders": [
    {
      "type": "amazon-ebs",
      "name": "aws",
      "region": "us-west-2",
      "source_ami_filter": {
        "filters": {
          "virtualization-type": "hvm",
          "name": "{{user `datacenter`}}-m5-*",
          "root-device-type": "ebs"
        },
        "owners": [
          "021221312242"
        ],
        "most_recent": true
      },
      "instance_type": "{{user `instance_type`}}",
      "ssh_username": "deploy",
      "ssh_private_key_file": "{{user `secret_path`}}/deploy-{{user `datacenter`}}",
      "ssh_handshake_attempts": "10",
      "ami_name": "{{user `component`}}-{{user `datacenter`}}-m5-{{isotime \"200601021504\"}}",
      "launch_block_device_mappings": [
        {
          "device_name": "/dev/sda1",
          "volume_size": "{{user `root_volume_size`}}",
          "volume_type": "gp2",
          "delete_on_termination": true
        }
      ],
      "vpc_id": "{{user `vpc_id`}}",
      "subnet_id": "{{user `subnet_id`}}",
    }
  ],
  "provisioners": [
    {
      "type": "shell-local",
      "pause_before": "5s",
      "command": "cd /opt/devops-automation/ansible && git pull && cd /opt/devops-automation/consul && git pull && cd /opt/devops-automation/application-configs && git pull"
    },
    {
      "type": "ansible",
      "pause_before": "5s",
      "user": "deploy",
      "sftp_command": "{{user `sftp_path`}}/sftp-server -e",
      "playbook_file": "{{user `playbooks_home`}}/build_AMI.yml",
      "inventory_directory": "{{user `ansible_home`}}/inventory/{{user `datacenter`}}",
      "groups": [
        "all"
      ],
      "extra_arguments": [
        "-e version={{user `version`}}",
        "-e default_repository={{user `default_repository`}}",
        "-e enable_datadog={{user `enable_datadog`}}",
        "-e datacenter={{user `datacenter`}}",
        "-vv"
      ]
    }
  ]
}