[ 
https://issues.apache.org/jira/browse/METRON-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487231#comment-16487231
 ] 

Ahmed Shah commented on METRON-1184:
------------------------------------

According to the following, AWS is migrating to using longer resource ids which 
might be increasing the control_path length.

https://aws.amazon.com/blogs/compute/longer-resource-ids-in-2018-for-amazon-ec2-amazon-ebs-and-amazon-vpc/


Instead of trying to make one control_path that is compatible for both Linux 
and Mac could the following approach be taken?:

In 
metron-deployment/amazon-ec2/README.md<https://github.com/apache/metron/blob/feature/METRON-1090-stellar-assignment/metron-deployment/amazon-ec2/README.md>
 add two new "Errors" in the "Common Error Section"

1)
Error: ''Failed to connect to the host via ssh: percent_expand: unknown key 
%C\r\n"

This error might occur if you are deploying with Linux OS. The %C in the 
control_path is compatible with Mac OS but might not be compatible with a Linux 
operating system.

Solution
If you see this error update the control_path  in ansble.cfg  to the following.
```
control_path = ~/.ssh/ansbile-ssh-%%h-%%r
```

2)
Error: ''too long for Unix domain socket\rn\n"
This error might occur if you are deploying with Mac OS.

Solution
If you see this error when deploying with a Mac update the control_path in  
ansble.cfg to the following.
```
control_path = ~/.ssh/ansible-ssh-%%C
```


-----------------------

Update ansble.cfg to include comments:


#When deploying with Mac OS use this control_path if you receive the following 
error "too long for Unix domain socket":

#[ssh_connection]

#control_path = ~/.ssh/ansible-ssh-%%C


#When deploying with Linux OS use this control_path if you receive the 
following error "Failed to connect to the host via ssh: percent_expand: unknown 
key %C":
#[ssh_connection]

#control_path = ~/.ssh/ansbile-ssh-%%h-%%r


-Ahmed



> EC2 Deployment - Updating control_path to accommodate for Linux
> ---------------------------------------------------------------
>
>                 Key: METRON-1184
>                 URL: https://issues.apache.org/jira/browse/METRON-1184
>             Project: Metron
>          Issue Type: Improvement
>    Affects Versions: 0.4.1
>         Environment: ClearOS[Distro of CentOS] npm 3.10.10, node 6.11.1, 
> docker 1.12.6, mvn 3.3.9, ansible 2.2.2.0, No Vagrant)
>            Reporter: ashah
>            Assignee: ashah
>            Priority: Minor
>              Labels: amazon, cloud
>             Fix For: 0.5.0
>
>
> PR: https://github.com/apache/metron/pull/754
> For 0.4.1-rc4, using "control_path = ~/.ssh/ansible-ssh-%%C" for a Linux 
> environment ( such as ClearOS[Distro of CentOS] npm 3.10.10, node 6.11.1, 
> docker 1.12.6, mvn 3.3.9, ansible 2.2.2.0, No Vagrant) could throw the 
> following error:
> ```
> "TASK [setup] 
> *******************************************************************
> fatal: [ec2-xx-yy-0-130.us-west-2.compute.amazonaws.com]: UNREACHABLE! => 
> {"changed": false, "msg": "Failed to connect to the host via ssh: 
> percent_expand: unknown key %C\r\n", "unreachable": true}" 
> ```
> This PR is to change the line to "control_path = ~/.ssh/ansbile-ssh-%%h-%%r" 
> to make amazon-ec2 also potentially deployable with Linux while preserving a 
> small path length. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to