Bug 788975

Summary: 3.1 - Error printing in safelease is cryptic.
Product: Red Hat Enterprise Linux 6 Reporter: Jaroslav Henner <jhenner>
Component: vdsmAssignee: Yeela Kaplan <ykaplan>
Status: CLOSED WONTFIX QA Contact: Haim <hateya>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: abaron, acathrow, bazulay, dyasny, iheim, mgoldboi, oourfali, oramraz, yeylon, ykaul
Target Milestone: rc   
Target Release: 6.4   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 10:47:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslav Henner 2012-02-09 13:09:51 UTC
Description of problem:
https://bugzilla.redhat.com/show_bug.cgi?id=787729#c9:
> The error is not Unknown error 18446744073709551506. Error printing in
> safelease is made as an exercise to the user. You nee to convert to a signed
> number and then change the signe to get errno
> 
> 18446744073709551506 is -110
> 110 is ETIMEOUT

Version-Release number of selected component (if applicable):
vdsm-4.9-112.6.el6_2.x86_64

How reproducible:
always

Steps to Reproduce:
1. Have the cgroups enabled,
2.
> Please got to /usr/libexec/vdsm/spmprotect.sh and change line 204
> from:
> dbg=""
> to:
> dbg="-d"
2. Then ask Saggi Mizrahi what to do (:
  
Actual results:
Thread-98::INFO::2012-02-06
20:52:18,954::dispatcher::100::Storage.Dispatcher.Protect::(run) Run and
protect: repoStats, Return response: {'status': {'message': 'OK', 'code': 0}}
Thread-89::DEBUG::2012-02-06
20:52:25,317::safelease::61::Storage.Misc.excCmd::(acquire) FAILED: <err> =
"[safelease:2937:1328554228755]: cmd_acquire: path
'/dev/d03a2839-5760-4e7d-9e3d-06df6474742a/leases' offset 0 id '1000' lease_ms
60000 op_max_ms 10000\n[safelease:2937:1328554228755]: readtag: fd 3 offset
0\n[safelease:2937:1328554228755]: readtag: r 512
Success\n[safelease:2937:1328554228755]: acquire: restart: curr tag is
'------FREE------0000000000000000'\n[safelease:2937:1328554228755]: acquire:
contend: curr tag is
'------FREE------0000000000000000'\n[safelease:2937:1328554228755]: buildtag:
'1000            0004b85022deade7' ts
1328554228755943\n[safelease:2937:1328554228755]: writetag:
Enter\n[safelease:2937:1328554228756]: writetag: Exit
r=0\n[safelease:2937:1328554345311]: readtag: fd 3 offset
0\n[safelease:2937:1328554345312]: readtag: r 512
Success\n[safelease:2937:1328554345312]: acquire: won    : curr tag is 1000    
       0004b85022deade7\n[safelease:2937:1328554345312]: readtag: fd 3 offset
0\n[safelease:2937:1328554345312]: readtag: r 512
Success\n[safelease:2937:1328554345312]: renew: curr tag is '1000           
0004b85022deade7'\n[safelease:2937:1328554345312]: timeleft_ms: time elapsed:
116557/60000\n[safelease:2937:1328554345312]: cmd_acquire: Failed (Unknown
error 18446744073709551506)\n"; <rc> = 1
Thread-89::ERROR::2012-02-06
...

Expected results:
Clean and clear error message.

Additional info:
#787729

Comment 3 Ayal Baron 2012-08-22 10:47:44 UTC
In V3 storage domains we no longer use safelease and the 'fix' is risky (it's not a minor log change), closing wontfix.