[9.1][Scale][Timmy] Timmy return exit_code==0 even if error occured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
Timmy Development Team |
Bug Description
Steps:
0. Master node /var partition should be small, to run into 'not enough space' when collecting logs. On my env /var has ~50gb free space, and log snapshot need ~334gb
1. cd /var/dump
2. fuel snapshot
Actual result:
Fuel create empty log snapshot:
[root@fuel dump]# fuel snapshot
Generating dump...
Downloading: http://
[======
[root@fuel dump]# ls -hal
total 20K
drwxr-xr-x. 2 root root 4.0K Sep 22 10:22 .
drwxr-xr-x. 25 root root 4.0K Sep 21 13:47 ..
-rw-r--r--. 1 root root 10K Sep 22 10:22 fuel-snapshot-
I re-run timmy directly with same command as Fuel did:
[root@fuel dump]# timmy --logs --days 3 --dest-file /var/dump/
Initializing node data: done
Calculating logs size: done
Total logs size to collect before compression: 334176MB.
Compressed logs will take less space.
Log collection period: 3 days.
Checking free space: done
And checking exit code:
[root@fuel dump]# echo $?
0
[root@fuel dump]# ls fuel-snapshot-
...
2016-09-22 18:13:07,356 INFO: nodes: is_enough_space(): logsize: 334291MB * 1.05, free space: 57770MB
2016-09-22 18:13:07,356 ERROR: nodes: is_enough_space(): Not enough space in "/var/dump/
2016-09-22 18:13:07,356 ERROR: cli: main(): Not enough space for logs in "/var/dump/
Root problem is that Timmy return exit code 0 when out of free space and can't gather logs.
Fuel receive timmy exit code == 0 and creating empty tar file which return to User.
By default /var partition allocate 40% from master node HDD size
Workaround:
None
Environment:
[root@fuel dump]# timmy -V
1.20.3
Master node has HDD 500 gb with /var partition 185 GB
Cluster has 200 nodes, deployed more than 3 days ago
Changed in fuel: | |
assignee: | nobody → Timmy Development Team (timmy-core) |
tags: | added: non-release |
Changed in fuel: | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Changed in fuel: | |
status: | Incomplete → In Progress |
assignee: | Maksym Strukov (unbelll) → Timmy Development Team (timmy-core) |
Changed in fuel: | |
milestone: | 9.1 → 9.2 |
Thank you for the bug report! /review. openstack. org/375052
Fix upstream - https:/
Fix downstream - I hope we can create a review with an updated package tomorrow morning