<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">I am trying to use AWS resource agents such as ‘awsvip’ and ‘awseip’ but my awscli profile “could not be found”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">[ec2-user@ip-172-31-43-116 ~]$ sudo pcs resource debug-start --full privip                                                                                                               <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"> warning: unpack_rsc_op_failure:        Processing failed start of privip on ip-172-31-43-84.eu-west-1.compute.internal: not running | rc=7<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">warning: unpack_rsc_op_failure:        Processing failed start of privip on ip-172-31-43-116.eu-west-1.compute.internal: not running | rc=7<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">warning: unpack_rsc_op_failure:        Processing failed start of privip on ip-172-31-45-167.eu-west-1.compute.internal: not running | rc=7<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">Operation start for privip (ocf:heartbeat:awsvip) returned: 'not running' (7)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 45: OCF_RESKEY_awscli_default=/usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 46: OCF_RESKEY_profile_default=default<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 47: OCF_RESKEY_api_delay_default=3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 49: : /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 50: : default<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 51: : 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 196: case $__OCF_ACTION in<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 203: AWSCLI=/usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 204: SECONDARY_PRIVATE_IP=172.31.45.5<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: 205: curl -s
<a href="http://169.254.169.254/latest/meta-data/instance-id">http://169.254.169.254/latest/meta-data/instance-id</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 205: INSTANCE_ID=i-0ea1bfc7adcc6197e<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: 206: /usr/bin/aws --profile default --output json ec2 describe-instances --instance-id i-0ea1bfc7adcc6197e<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: 206: awk '-F"' '{print$4}'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: 206: grep -m 1 eni<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: The config profile (default) could not be found<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 206: NETWORK_ID=<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 208: case $__OCF_ACTION in<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 210: awsvip_validate<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_validate:181: check_binary /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: check_binary:56: have_binary /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: have_binary:68: '[' '' = 1 ']'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: have_binary:71: echo /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: have_binary:71: sed -e 's/ -.*//'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: have_binary:71: local bin=/usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: ++ 12:47:21: have_binary:72: which /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: have_binary:72: test -x /usr/bin/aws<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_validate:183: '[' -z default ']'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_validate:188: '[' -z i-0ea1bfc7adcc6197e ']'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_validate:193: return 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: 211: awsvip_start<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_start:132: awsvip_monitor<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_monitor:171: /usr/bin/aws --profile default ec2 describe-instances --instance-id i-0ea1bfc7adcc6197e<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: + 12:47:21: awsvip_monitor:171: grep -q 172.31.45.5<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">>  stderr: The config profile (default) could not be found<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><truncated><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">But if I simply run the binary with the same options there is no issue:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">[ec2-user@ip-172-31-43-116 ~]$ /usr/bin/aws --profile default --output json ec2 describe-instances --instance-id i-0ea1bfc7adcc6197e<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">    "Reservations": [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">        {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">            "Instances": [<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "Monitoring": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                        "State": "disabled"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    },<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "PublicDnsName": "ec2-34-243-96-249.eu-west-1.compute.amazonaws.com",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "State": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                        "Code": 16,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                        "Name": "running"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    },<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "EbsOptimized": true,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "LaunchTime": "2021-07-07T11:10:57.000Z",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "PublicIpAddress": "34.243.96.249",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "PrivateIpAddress": "172.31.43.116",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "ProductCodes": [],<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                    "VpcId": "vpc-58799c3f",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                   "CpuOptions": {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                        "CoreCount": 1,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">                        "ThreadsPerCore": 2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:#2000">                    },</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><truncated><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">I’ve tried recreating the awscli profile with a named option (instead of default) and create the resource with the same named option (instead of default) but I get the
 same result, eg “The config profile (aaron) could not be found.” I’m not sure how to troubleshoot this further since the RA is leveraging /usr/bin/aws which is using a properly configured profile.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">Thanks for any helpful suggestions!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#3D3C40;mso-fareast-language:#2000">Aaron<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>