Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors with vs bandwidth #1563

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

allmightyspiff
Copy link
Member

Fixes #1561

Before

$ ./slcli -v vs bandwidth 121401696 -s 2021-11-01 -e 2021-11-02
The Summary Period option is currently set to the 300s as the backend API will throw an exception
any other value. This should be resolved in the next version of the slcli.
Calling: SoftLayer_Virtual_Guest::getMetricTrackingObjectId(id=121401696, mask='', filter='None', args=(), limit=None, offset=None))
Calling: SoftLayer_Metric_Tracking_Object::getBandwidthData(id=65676810, mask='', filter='None', args=('2021-11-01', '2021-11-02', None, 300), limit=100, offset=0))
SoftLayerAPIError(500): Metric Service call failed after attempting to connect to these hosts, in order:
web-agent-proxy-bds-metrics.app.com.okd.softlayer.local:80

After

$ ./slcli -v vs bandwidth 121401696 -s 2021-11-01 -e 2021-11-02
The Summary Period option is currently set to the 300s as the backend API will throw an exception
any other value. This should be resolved in the next version of the slcli.
Calling: SoftLayer_Virtual_Guest::getMetricTrackingObjectId(id=121401696, mask='', filter='None', args=(), limit=None, offset=None))
Calling: SoftLayer_Metric_Tracking_Object::getBandwidthData(id=65676810, mask='', filter='None', args=('2021-11-01', '2021-11-02', None, None), limit=100, offset=0))
:.............................................................:
:                           Summary                           :
:.........:........:..............:........:..................:
:   Type  : Sum GB : Average MBps : Max GB :     Max Date     :
:.........:........:..............:........:..................:
:  Pub In : 0.0079 :    0.0001    : 0.0001 : 2021-11-01 01:15 :
: Pub Out : 0.0037 :     0.0      : 0.0001 : 2021-11-01 01:20 :
:  Pri In : 0.0533 :    0.0006    : 0.0337 : 2021-11-01 21:45 :
: Pri Out : 0.0012 :     0.0      : 0.0002 : 2021-11-01 21:45 :
:.........:........:..............:........:..................:
:........................................................:
:       Bandwidth Report: 2021-11-01 - 2021-11-02        :
:..................:........:.........:........:.........:
:       Date       : Pub In : Pub Out : Pri In : Pri Out :
:..................:........:.........:........:.........:
: 2021-10-31 22:00 :  0.0   :   0.0   : 0.0001 :   0.0   :
: 2021-10-31 22:05 :  0.0   :   0.0   : 0.0001 :   0.0   :

VIRT-11733 should fix the SoftLayerAPIError(500): Metric Service call failed after attempting to connect to these hosts, in order: web-agent-proxy-bds-metrics.app.com.okd.softlayer.local:80 errors when getting bandwidth data for virtual guests. As far as I can tell, other type of objects that have bandwidth data are not effected, so no worries there.

… specifically send in None to the API so the command will at least work
Copy link
Contributor

@caberos caberos left a comment

Choose a reason for hiding this comment

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

Testing
✔️ slcli vs bandwidth 121401696 -s 2021-11-01 -e 2021-11-02
:......................................................................:
: Summary :
:.........:........:..............:........:...........................:
: Type : Sum GB : Average MBps : Max GB : Max Date :
:.........:........:..............:........:...........................:
: Pub In : 0.0079 : 0.0001 : 0.0001 : 2021-11-01T01:15:00-07:00 :
: Pub Out : 0.0037 : 0.0 : 0.0001 : 2021-11-01T01:20:00-07:00 :
: Pri In : 0.0533 : 0.0006 : 0.0337 : 2021-11-01T21:45:00-07:00 :
: Pri Out : 0.0012 : 0.0 : 0.0002 : 2021-11-01T21:45:00-07:00 :
:.........:........:..............:........:...........................:
:.................................................................:
: Bandwidth Report: 2021-11-01 - 2021-11-02 :
:...........................:........:.........:........:.........:
: Date : Pub In : Pub Out : Pri In : Pri Out :
:...........................:........:.........:........:.........:
: 2021-10-31T22:00:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:05:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:10:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:15:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:20:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :

✔️ slcli vs bandwidth 121401696 -s 2021-11-01 -e 2021-11-02 -p 84600
:......................................................................:
: Summary :
:.........:........:..............:........:...........................:
: Type : Sum GB : Average MBps : Max GB : Max Date :
:.........:........:..............:........:...........................:
: Pub In : 0.0079 : 0.0001 : 0.0001 : 2021-11-01T01:15:00-07:00 :
: Pub Out : 0.0037 : 0.0 : 0.0001 : 2021-11-01T01:20:00-07:00 :
: Pri In : 0.0533 : 0.0006 : 0.0337 : 2021-11-01T21:45:00-07:00 :
: Pri Out : 0.0012 : 0.0 : 0.0002 : 2021-11-01T21:45:00-07:00 :
:.........:........:..............:........:...........................:
:.................................................................:
: Bandwidth Report: 2021-11-01 - 2021-11-02 :
:...........................:........:.........:........:.........:
: Date : Pub In : Pub Out : Pri In : Pri Out :
:...........................:........:.........:........:.........:
: 2021-10-31T22:00:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:05:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:10:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :
: 2021-10-31T22:15:00-07:00 : 0.0 : 0.0 : 0.0001 : 0.0 :

Copy link
Contributor

@FernandoOjeda FernandoOjeda left a comment

Choose a reason for hiding this comment

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

Looks good.

@allmightyspiff allmightyspiff merged commit d448cf3 into softlayer:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

slcli vs bandwidth reports no longer works
3 participants