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

Unable to run swift-dispersion-check if the container in swift is not created yet #71

Open
openstacks opened this issue Apr 20, 2016 · 0 comments

Comments

@openstacks
Copy link

if there is no container in swift cluster Sensu throws this critical alter:
SwiftDispersionCheck CRITICAL: Unable to run swift-dispersion-check: Command '['swift-dispersion-report', '-j']' returned non-zero exit status 1 None

swift-dispersion

command
sudo /etc/sensu/plugins/check-swift-dispersion.sh

output
SwiftDispersionCheck CRITICAL: Unable to run swift-dispersion-check: Command '['swift-dispersion-report', '-j']' returned non-zero exit status 1 None

Check on swift proxy node:
root@ds0013:/etc/sensu/plugins# swift stat
Account: 17e024851c844fb1ac5b867fd2e0aa28
Containers: 0
Objects: 0
Bytes: 0
Containers in policy "policy-0": 0
Objects in policy "policy-0": 0
Bytes in policy "policy-0": 0
X-Account-Project-Domain-Id: default
Connection: close
X-Timestamp: 1458951735.07750
X-Trans-Id: txdc4dce8d3fae4d7e9aa15-0057174859
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes

Run swift-dispersion-report

root@ds0013:/etc/sensu/plugins# swift-dispersion-report -j
/opt/bbc/openstack-11.0-bbc148/swift/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:100: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
/opt/bbc/openstack-11.0-bbc148/swift/local/lib/python2.7/site-packages/keystoneclient/service_catalog.py:196: UserWarning: Providing attr without filter_value to get_urls() is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release. Either both should be provided or neither should be provided.
'Providing attr without filter_value to get_urls() is '
No containers to query. Has swift-dispersion-populate been run?
Traceback (most recent call last):
File "/usr/local/bin/swift-dispersion-report", line 377, in
options.partitions)
File "/usr/local/bin/swift-dispersion-report", line 177, in object_dispersion_report
container, prefix='dispersion_', full_listing=True)[1]]
File "/opt/bbc/openstack-11.0-bbc148/swift/local/lib/python2.7/site-packages/swift/common/internal_client.py", line 822, in get_container
return self.retry_request('GET', container=container, *_kwargs)
File "/opt/bbc/openstack-11.0-bbc148/swift/local/lib/python2.7/site-packages/swift/common/internal_client.py", line 805, in retry_request
return self.base_request(method, *_kwargs)
File "/opt/bbc/openstack-11.0-bbc148/swift/local/lib/python2.7/site-packages/swift/common/internal_client.py", line 765, in base_request
conn = urllib2.urlopen(req, timeout=timeout)
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
root@ds0013:/etc/sensu/plugins#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant