Skip to content
This repository was archived by the owner on Feb 27, 2020. It is now read-only.

Attempt to port the actions from the AIO in proper charms#41

Open
thomnico wants to merge 2 commits into
Metaswitch:trustyfrom
thomnico:trusty
Open

Attempt to port the actions from the AIO in proper charms#41
thomnico wants to merge 2 commits into
Metaswitch:trustyfrom
thomnico:trusty

Conversation

@thomnico

Copy link
Copy Markdown
Contributor

Proposed actions on the scalable charms ... Got error trying ... can you check it ?

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Minor) indentation.

@mirw

mirw commented Apr 21, 2016

Copy link
Copy Markdown
Contributor

Looks good. When you say "Got error trying ... can you check it ?", please can you elaborate? What error did you see?

@thomnico

Copy link
Copy Markdown
Contributor Author

Here are the logs:

unit-clearwater-homestead-0[8464] 2016-04-21 17:31:03 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 + sudo -S
/usr/share/clearwater/bin/display_user 1234 ims.nfv.ovh
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:24 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 Public User ID
sip:1234@ims.nfv.ovh:
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:24 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 ERROR: Failed
to retrieve private IDs for public ID sip:1234@ims.nfv.ovh -
HTTP status code 599
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:44 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 ERROR: Failed
to retrieve iFC for public ID sip:1234@ims.nfv.ovh - HTTP st
atus code 599
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:44 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 + echo
'Subscriber doesn'''t exist - creating'
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:44 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 Subscriber
doesn't exist - creating
unit-clearwater-homestead-0[8464] 2016-04-21 17:31:44 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 + sudo -S
/usr/share/clearwater/bin/create_user 1234 ims.nfv.ovh 7kkzTyGW

unit-clearwater-homestead-0[8464] 2016-04-21 17:33:04 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 ERROR: Failed
to retrieve private IDs for public ID sip:1234@ims.nfv.ovh -
HTTP status code 599
unit-clearwater-homestead-0[8464] 2016-04-21 17:33:24 INFO
unit.clearwater-homestead/0.create-update-user logger.go:40 ERROR: Failed
to retrieve iFC for public ID sip:1234@ims.nfv.ovh - HTTP st
atus code 599

On Thu, Apr 21, 2016 at 2:45 PM, mirw notifications@github.com wrote:

Looks good. When you say "Got error trying ... can you check it ?", please
can you elaborate? What error did you see?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#41 (comment)

Best Regards,
Nicolas Thomas
http://insights.ubuntu.com/?p=889
EMEA Solution Architect Canonical
GPG FPR: D592 4185 F099 9031 6590 6292 492F C740 F03A 7EB9



# 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 ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@mirw

mirw commented Apr 29, 2016

Copy link
Copy Markdown
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants