Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openstack-build-ubuntu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
David Johnson
openstack-build-ubuntu
Commits
bcee4ed9
Commit
bcee4ed9
authored
Jun 01, 2016
by
David Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable openstack-slothd for Juno too; get rid of some cruft.
parent
00b7d787
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
openstack-slothd.py
openstack-slothd.py
+2
-4
setup-controller.sh
setup-controller.sh
+29
-3
No files found.
openstack-slothd.py
View file @
bcee4ed9
...
...
@@ -271,8 +271,6 @@ def fetchall(client):
# Ok, collect all the statistics, grouped by VM, for the period. We
# have to specify this duration
#
#qm = QueryManager()
q
=
client
.
query_samples
.
query
(
limit
=
1
)
for
period
in
PERIODS
:
periods
[
period
]
=
{}
vm_dict
=
dict
()
#count=vm_0,list=[])
...
...
@@ -292,7 +290,7 @@ def fetchall(client):
for
meter
in
DMETERS
:
mdict
=
{}
statistics
=
client
.
statistics
.
list
(
meter
,
#period=period,
groupby
=
'resource_id'
,
groupby
=
[
'resource_id'
]
,
q
=
q
)
LOG
.
debug
(
"Statistics for %s during period %d (len %d): %s"
%
(
meter
,
period
,
len
(
statistics
),
pp
.
pformat
(
statistics
)))
...
...
@@ -357,7 +355,7 @@ def fetchall(client):
pass
mdict
=
{}
statistics
=
client
.
statistics
.
list
(
meter
,
#period=period,
groupby
=
'resource_id'
,
groupby
=
[
'resource_id'
]
,
q
=
q
)
LOG
.
debug
(
"Statistics for %s during period %d (len %d): %s"
%
(
meter
,
period
,
len
(
statistics
),
pp
.
pformat
(
statistics
)))
...
...
setup-controller.sh
View file @
bcee4ed9
...
...
@@ -2721,12 +2721,11 @@ fi
#
# Install and startup the slothd-for-openstack idleness detector
#
cp
-p
$DIRNAME
/openstack-slothd.py
$OURDIR
/
if
[
$OSVERSION
-ge
$OSKILO
]
;
then
cp
-p
$DIRNAME
/openstack-slothd.py
$OURDIR
/
cat
<<
EOF
>/etc/systemd/system/openstack-slothd.service
[Unit]
Description=
OpenStack Slothd
Description=
Cloudlab OpenStack Resource Usage Collector
After=network.target network-online.target local-fs.target
Wants=network.target
Before=rabbitmq-server.service
...
...
@@ -2745,6 +2744,33 @@ EOF
systemctl
enable
openstack-slothd.service
systemctl restart openstack-slothd.service
else
cat
<<
EOF
>/etc/init/openstack-slothd.conf
# openstack-slothd - Cloudlab OpenStack Resource Usage Collector
#
# openstack-slothd collects OpenStack resource usage statistics
description "Cloudlab OpenStack slothd"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
expect stop
console none
pre-start script
test -x /root/setup/openstack-slothd.py || { stop; exit 0; }
end script
exec /root/setup/openstack-slothd.py &
EOF
service openstack-slothd
enable
service openstack-slothd start
fi
RANDPASSSTRING
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment