Ticket #884 (closed defect: fixed)
Traceback with Path tag in Rules Plugin
Reported by: | Jack Neely <[email protected]…> | Owned by: | solj |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.1.0 Release |
Component: | bcfg2-server | Version: | 1.0 |
Keywords: | Cc: | [email protected]… |
Description
I'm setting up some directories with the Path tag and getting tracebacks. Bcfg2 1.0.1:
Unexpected failure of verification method for entry type Path Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/Bcfg2/Client/Tools/__init__.py", line 126, in Inventory states[entry] = func(entry, mods) File "/usr/lib/python2.6/site-packages/Bcfg2/Client/Tools/POSIX.py", line 732, in VerifyPath return ret(entry, _) File "/usr/lib/python2.6/site-packages/Bcfg2/Client/Tools/POSIX.py", line 688, in Verifydirectory return ret(entry, _) File "/usr/lib/python2.6/site-packages/Bcfg2/Client/Tools/POSIX.py", line 200, in VerifyDirectory pTrue = ((owner == str(normUid(entry))) and File "/usr/lib/python2.6/site-packages/Bcfg2/Client/Tools/POSIX.py", line 55, in normUid return int(pwd.getpwnam(entry.get('owner'))[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2)) TypeError: getpwnam() argument 1 must be string, not None
My line in my rules XML that matches this is:
<Path type='directory' name='/afs'/>
If I had the "owner" argument the traceback goes away and I get
GID normalization failed for /afs
So, Bcfg2 client side isn't catching this error condition properly.
Attachments
Change History
comment:1 Changed 13 years ago by solj
- Cc [email protected]… added
- Owner changed from desai to solj
- Status changed from new to accepted
- Component changed from bcfg2-client to bcfg2-server
comment:2 follow-up: ↓ 3 Changed 13 years ago by Jack Neely <[email protected]…>
The attached patch makes bcfg2-repo-validate alert me that I'm missing arguments on my Path tag in the Rules plugin. I approve. ;-)
However, this does nothing for the Bcfg2 client that still gives the above traceback if the 'owner' argument isn't specified. I was looking for a saner failure in this case rather than blowing up the POSIX driver.
comment:3 in reply to: ↑ 2 Changed 13 years ago by solj
- Cc [email protected]… added; [email protected]… removed
Replying to Jack Neely <[email protected]…>:
The attached patch makes bcfg2-repo-validate alert me that I'm missing arguments on my Path tag in the Rules plugin. I approve. ;-)
However, this does nothing for the Bcfg2 client that still gives the above traceback if the 'owner' argument isn't specified. I was looking for a saner failure in this case rather than blowing up the POSIX driver.
Okay, we'll add a fix on that side as well.
comment:4 Changed 13 years ago by solj
- Status changed from accepted to closed
- Resolution set to fixed
[ce8ed0ecbb9fa3cbb9404c23025a81ba375c959c] (SVN r5940) fixes the installation of incompletely specified entries.
This is a problem with our repository validation. Try the attached patch.