Attempt to port the actions from the AIO in proper charms#41
Conversation
| if ! sudo -S /usr/share/clearwater/bin/display_user $number $home_domain ; | ||
| then | ||
| echo "Subscriber doesn't exist - creating" | ||
| sudo -S /usr/share/clearwater/bin/create_user $number $home_domain $password |
|
Looks good. When you say "Got error trying ... can you check it ?", please can you elaborate? What error did you see? |
|
Here are the logs: unit-clearwater-homestead-0[8464] 2016-04-21 17:31:03 INFO unit-clearwater-homestead-0[8464] 2016-04-21 17:33:04 INFO On Thu, Apr 21, 2016 at 2:45 PM, mirw notifications@github.com wrote:
Best Regards, |
|
|
||
|
|
||
| # If the user doesn't exist, try to create them. Otherwise, try to update them. | ||
| if ! sudo -S /usr/share/clearwater/bin/display_user $number $home_domain ; |
There was a problem hiding this comment.
Why sudo -S (specifically the -S)? We're not providing a username or password here. Surely if the current user is not already authenticated, there's no way we can succeed?
|
I took a look at this. 599 is the return code that the Python HTTP client we use within display_user returns when the server doesn't respond in a timely manner. However, we always check that the server is reachable first (and give a different error message if not), and only then try to actually retrieve the subscriber's details. My suspicion would be that the Cassandra cluster is not responsive (so homestead-prov gets blocked, and so is slow to respond too) - please can you check that? See http://clearwater.readthedocs.io/en/stable/Troubleshooting_and_Recovery.html#homer-and-homestead for pointers. Also, I had one more comment on your code above. |
Proposed actions on the scalable charms ... Got error trying ... can you check it ?