Bug 239805
| Summary: | failed when saving "share published printers connected to this system" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | ericm24x7 | ||||
| Component: | system-config-printer | Assignee: | Tim Waugh <twaugh> | ||||
| Status: | CLOSED ERRATA | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | rawhide | CC: | mishu, nphilipp | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 0.7.63.2-2.fc7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2007-06-13 21:04:56 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 236808 | ||||||
| Attachments: |
|
||||||
Do you still see this? Can you attach your /etc/cups/cupsd.conf file please? Created attachment 155271 [details]
cupsd config file
I see this with a pristine cupsd.conf from cups-1.2.10-10.fc7 -- I upgraded from FC6 to F7, then moved the cupsd.conf.rpmnew over the old cupsd.conf file, then started s-c-printer and attempted to share the printers as described above. Hmm, I haven't been able to reproduce that behaviour here. If you fetch 1.2.0-11.fc7 from here (both the cups and cups-libs packages): http://koji.fedoraproject.org/koji/taskinfo?taskID=19891 can you still reproduce the problem? I just installed and tested i386 build tree, cups-1.2.10-10.fc7 works OK while it failed under x86_64. I will re-install x86_64 again, and update to 1.2.10-11.fc7 I will update on the result a little later today. The mirror I'm using do not have the complete x86_64 build tree at the moment. The missing files are the boot files that reside beneath isolinux and images directory. I can't install the system without the boot files. Will try again later... This is on x86_64, the traceback is when trying to apply the changed server
settings:
root@wombat:~> system-config-printer
Traceback (most recent call last):
File "/usr/share/system-config-printer/system-config-printer.py", line 1099,
in on_btnApply_clicked
err = self.apply()
File "/usr/share/system-config-printer/system-config-printer.py", line 1110,
in apply
return self.save_serversettings()
File "/usr/share/system-config-printer/system-config-printer.py", line 3109,
in save_serversettings
self.cups.adminSetServerSettings(setting_dict)
RuntimeError: Failed to set settings
root@wombat:~> rpm -q system-config-printer cups cups-libs
system-config-printer-0.7.63.1-1.fc7
cups-1.2.10-11.fc7
cups-libs-1.2.10-11.fc7
cups-libs-1.2.10-11.fc7
root@wombat:~>
I haven't been able to reproduce this, even on x86_64. :-( Nils, would it be possible for you to try single-stepping through the _cupsAdminSetServerSettings() function to see where it fails? This function comes from libcups, cups-1.2.10/cups/adminutil.c in the source. Once you've installed cups-debuginfo-1.2.10-11.fc7 you should be able to do this: $ gdb --args python /usr/sbin/system-config-printer (gdb) b _cupsAdminSetServerSettings (gdb) run and get a prompt at the point you press Apply. Is the following enough?
971 {
(gdb)
(gdb) list
966 int /* O - 1 on success, 0 on failure */
967 _cupsAdminSetServerSettings(
968 http_t *http, /* I - Connection to server */
969 int num_settings, /* I - Number of settings */
970 cups_option_t *settings) /* I - Settings */
971 {
972 int i; /* Looping var */
973 http_status_t status; /* GET/PUT status */
974 const char *server_port_env; /* SERVER_PORT env var */
975 int server_port; /* IPP port for server */
(gdb) n
1013 _cups_globals_t *cg = _cupsGlobals(); /* Global data */
(gdb) n
1020 if (!http || !num_settings || !settings)
(gdb) n
1013 _cups_globals_t *cg = _cupsGlobals(); /* Global data */
(gdb) n
1020 if (!http || !num_settings || !settings)
(gdb) n
1022 _cupsSetError(IPP_INTERNAL_ERROR, NULL);
(gdb) n
1834 }
(gdb) n
0x00002aaab0be0839 in ?? () from /usr/lib64/python2.5/site-packages/cups.so
(gdb) n
Cannot find bounds of current function
(gdb)
Do you have the rest of that session still saved? I would like to know what http, num_settings, and settings, are.. I've just repeated what I did above, then single steppeed past the _cupsSetError() call: (gdb) print http $1 = (http_t *) 0xc5a5e0 (gdb) print num_settings $2 = 0 (gdb) print settings $3 = (cups_option_t *) 0x0 Can you try adjusting /usr/share/system-config-printer/system-config-printer.py
so that it looks like this, starting at line 3108?:
try:
print setting_dict ## i.e. just add this line
self.cups.adminSetServerSettings(setting_dict)
except cups.IPPError, (e, m):
self.show_IPP_Error(e, m)
return True
What it setting_dict before the call to set the settings?
setting_dict is:
{'SystemGroup': 'sys root', '_remote_admin': '0', 'DefaultAuthType': 'Basic',
'_share_printers': '1', '_debug_logging': '0', '_remote_printers': '1',
'_user_cancel_any': '0'}
Please get system-config-printer-0.7.63.2-1.fc7 from updates-testing and then run this in a terminal: PYCUPS_DEBUG=1 /usr/sbin/system-config-printer When you trigger the problem this time, we should get to see what values the Python bindings saw. root@wombat:~> PYCUPS_DEBUG=1 /usr/sbin/system-config-printer
-> Connection_init()
httpConnectEncrypt(...)
<- Connection_init() = 0
-> Connection_getPrinters()
cupsDoRequest("/")
Attribute: printer-is-shared
Added printer-is-shared to dict
Attribute: printer-state
Added printer-state to dict
Attribute: printer-state-message
Added printer-state-message to dict
Attribute: printer-state-reasons
-> build_list_from_attribute_strings()
none
<- build_list_from_attribute_strings()
Added printer-state-reasons to dict
Attribute: printer-type
Added printer-type to dict
Attribute: printer-uri-supported
Added printer-uri-supported to dict
Attribute: printer-name
Attribute: printer-location
Added printer-location to dict
Attribute: printer-info
Added printer-info to dict
Attribute: device-uri
Added device-uri to dict
Attribute: printer-make-and-model
Added printer-make-and-model to dict
Attribute: printer-is-shared
Added printer-is-shared to dict
Attribute: printer-state
Added printer-state to dict
Attribute: printer-state-message
Added printer-state-message to dict
Attribute: printer-state-reasons
-> build_list_from_attribute_strings()
none
<- build_list_from_attribute_strings()
Added printer-state-reasons to dict
Attribute: printer-type
Added printer-type to dict
Attribute: printer-uri-supported
Added printer-uri-supported to dict
Attribute: printer-name
Attribute: printer-location
Added printer-location to dict
Attribute: printer-info
Added printer-info to dict
Attribute: device-uri
Added device-uri to dict
Attribute: printer-make-and-model
Added printer-make-and-model to dict
<- Connection_getPrinters() = dict
-> Connection_getClasses()cupsDoRequest("/")
<- Connection_getClasses() = dict
-> Connection_adminSetServerSettings()
num_settings=0, settings=(nil)
<- Connection_adminSetServerSettings() EXCEPTION
Traceback (most recent call last):
File "/usr/share/system-config-printer/system-config-printer.py", line 1106,
in on_btnApply_clicked
err = self.apply()
File "/usr/share/system-config-printer/system-config-printer.py", line 1117,
in apply
return self.save_serversettings()
File "/usr/share/system-config-printer/system-config-printer.py", line 3125,
in save_serversettings
self.cups.adminSetServerSettings(setting_dict)
RuntimeError: Failed to set settings
Can you try the change from comment #12 again? This time it starts at line 3124. I'd like to be able to catch both the 'print setting_dict' output from the Python *and* the pycups debugging output saying what it found. Thanks. just the changed snippet:
Added printer-make-and-model to dict
<- Connection_getPrinters() = dict
-> Connection_getClasses()cupsDoRequest("/")
<- Connection_getClasses() = dict
{'SystemGroup': 'sys root', '_remote_admin': '0', 'DefaultAuthType': 'Basic',
'_share_printers': '1', '_debug_logging': '0', '_remote_printers': '1',
'_user_cancel_any': '0'}
-> Connection_adminSetServerSettings()
num_settings=0, settings=(nil)
<- Connection_adminSetServerSettings() EXCEPTION
Can you please try these packages (system-config-printer and system-config-printer-libs): http://koji.fedoraproject.org/koji/taskinfo?taskID=30879 I think it might be to do with the fact that Python 2.5 changed the function signature of PyDict_Next(). This is the link to the actual packages: http://koji.fedoraproject.org/koji/buildinfo?buildID=8397 Sorry Tim for not getting back too soon, got problem with the mirrors not updating. Anyway, I just downloaded system-config-printer-0.7.63.2-2.fc7.x86_64.rpm and it seem to work now. I can also see the share from remote client and did a quick test to print. Result: Successful! Great job... Closing this bug now. Thanks for testing. I'll set this to MODIFIED until the update is actually pushed. system-config-printer-0.7.63.2-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. system-config-printer-0.7.63.2-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: I received the following traceback when trying to apply/save the following option: "Server Settings" > "[x]Share published printers connected to this system" Traceback (most recent call last): File "/usr/share/system-config-printer/system-config-printer.py", line 1099, in on_btnApply_clicked err = self.apply() File "/usr/share/system-config-printer/system-config-printer.py", line 1110, in apply return self.save_serversettings() File "/usr/share/system-config-printer/system-config-printer.py", line 3109, in save_serversettings self.cups.adminSetServerSettings(setting_dict) RuntimeError: Failed to set settings Version-Release number of selected component (if applicable): system-config-printer 0.7.63.1.x86_64 How reproducible: persistent Steps to Reproduce: 1. system-config-printer 2. Select the following options "Server Settings" > "[x]Share published printers connected to this system" 3. Press [apply] button Actual results: display traceback shown above