Closed mbloch1986 closed 6 years ago
https://github.com/shinesolutions/puppet-aem-curator/pull/17 and https://github.com/shinesolutions/aem-aws-stack-provisioner/pull/57
command
make export-packages stack_prefix=michaelb-aem63 topic_config_file=ansible/inventory/group_vars/all.yaml message_config_file=ansible/inventory/group_vars/export-packages.yaml component=author-primary descriptor_file=messenger/export-backup-descriptor.json
Error message
Feb 12 16:31:39 ip-172-31-35-58 amazon-ssm-agent: "standardError": "\u001b[1;31mError: Could not run: Could not find file manifests/download-descriptor.pp\u001b[0m\n\nfailed to run commands: exit status 1"
https://github.com/shinesolutions/puppet-aem-curator/pull/17 and https://github.com/shinesolutions/aem-aws-stack-provisioner/pull/57
command
make import-package \ stack_prefix=michaelb-aem63 \ topic_config_file=ansible/inventory/group_vars/all.yaml \ message_config_file=ansible/inventory/group_vars/import-package.yaml \ component=author-primary \ source_stack_prefix=cliffs3 \ package_group=shinesolution \ package_name=aem-helloworld \ package_datestamp=2017-03
Error message
1Error: Execution of '/usr/bin/aws s3 cp s3://aem-stack-builder/backup/cliffs3/shinesolution/2017/-0/aem-helloworld-2017-03-author-primary.zip /tmp/aem-helloworld-2017-03-author-primary.zip_20180212-13444-129zeup' returned 1: fatal error: An error occurred (404) when calling the HeadObject operation: Key \"backup/cliffs3/shinesolution/2017/-0/aem-helloworld-2017-03-author-primary.zip\" does not exist
https://github.com/shinesolutions/puppet-aem-curator/pull/16 and https://github.com/shinesolutions/aem-aws-stack-provisioner/pull/56
command
make promote-author stack_prefix=michaelb-aem63 topic_config_file=ansible/inventory/group_vars/all.yaml message_config_file=ansible/inventory/group_vars/promote-author.yaml
Error message
/opt/shinesolutions/aem-tools/promote-author-standby-to-primary.sh: No such file or directory\n\nfailed to run commands: exit status 127"
Command:
./send-message.sh "michaelb-aem63" "ansible/inventory/group_vars/all.yaml" "ansible/inventory/group_vars/export-package.yaml" "component=author-primary package_group=shinesolutions package_name=aem-helloworld package_filter=[{"root":"/apps/helloworld","rules":[]},{"root":"/etc/designs/helloworld","rules":[]}]"
Error message: TASK [log_output] ** changed: [127.0.0.1] => {"changed": true, "item": [{"instance_id": "i-0496a4931ba364680", "log_file": "/Users/mbloch/Documents/projects/aem-stack-manager-messenger/logs/aem-stack-manager/stack-manager/SSMOutput/d2cd13d7-fb6c-45eb-b32b-5742a691df3a/i-0496a4931ba364680/awsrunShellScript/runShellScript/stderr", "log_output": "Redirecting to /bin/systemctl stop aem-aem.service\nFailed to stop aem-aem.service: Unit aem-aem.service not loaded.\n\nfailed to run commands: exit status 1"}]}
Reason:
As preperation for the offline-snapshot the Lambda function execute the ssm command manage-service in Advance.
Within the Document it tries to execute the following command: RunCommand":[". /etc/profile","/sbin/service aem-aem {{ action }}"]}
As there is no service called aem-aem it's failing.
One solution would be, to change the Lambda function for every manage-service call to add a value for the aem instance type.
Fixed with PR https://github.com/shinesolutions/aem-stack-manager-cloud/pull/13/files
After the fix we get a Success
message.
See issue: https://github.com/shinesolutions/puppet-aem-curator/issues/14
Released in 0.9.13 .
Ticket to doc not working commands
export-package:
Fixed with PR
https://github.com/shinesolutions/puppet-aem-curator/pull/17 and https://github.com/shinesolutions/aem-aws-stack-provisioner/pull/57
But haven't figured out the correct Syntax for parameter package-filter.
Exits with an error of an unacceptable JSONArray.
Command:
./send-message.sh "michaelb-aem63" "ansible/inventory/group_vars/all.yaml" "ansible/inventory/group_vars/export-package.yaml" "component=author-primary package_group=shinesolutions package_name=aem-helloworld package_filter=[{"root":"/apps/helloworld","rules":[]},{"root":"/etc/designs/helloworld","rules":[]}]"
Error message:
after changing the encoding of the json payload in the Lambda function from
encoded = json.loads(message['details']['package_filter'])
toencoded = json.dumps(message['details']['package_filter'])
I get following error message: