[yast-devel] Commits available on irc
If you hang out in freenode, the channel #zypp has real time forwarding of commits to the subversion repository. For #yast, the commits go to #yast-commits as they have more traffic than ZYpp repo. The YaST bot includes the ZYpp commits too. Any setting can be changed, so lets see how it works this way! Cheers! Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
I scanned all files below /usr/share/YaST2/{modules,clients,include} grepping for "SCR::". Just to get statistical relevant data, not for complete coverage. The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future. Feedback is welcome. Both on current SCR and on future SCR usage. Klaus --------------------------- Initial observations - Inspection (SCR::Dir) is used quite often - Main use for SCR::Execute is shell scripts or shell-level commands like mount, umount or remove. - Quite some mis-uses of Execute like - 'SCR::Execute(.curl.get)' (should be 'SCR::Read(.curl)') and - 'SCR::Execute(.curl.setUserPassword)' (should be SCR::Write(.curl.User.Password, ...) - SCR::Read is mostly used to get specific values from config files (.etc.sysconfig, .etc.install_inf, .content) and for harware probing. - Some historical leftovers (like .modinfo.kernel.sound.oss which is unsupported iirc) - Some misuses can be spotted in the code, like reading complete files and parsing them in YCP instead of using a SCR agent. Raw results below. Explanation: The SCR function (Dir, Read, Write) is leftmost. Then each path element indented by 4 spaces. A paranthesed number means this path is used multiple times. ----- Dir audio alsa cards (5) etc cups cupsd_conf section value hosts imapd_conf inittab (2) install_inf (2) install_inf_options krb5_conf s (4) security section ssh ssh_config s (2) grub sections modinfo kernel sound oss (2) modprobe_newid install modprobe_sound options modprobe_tv install options (2) modules options network section product features section value providers s (2) sudo sysconfig SuSEfirewall2 bluetooth hardware section network providers s syseditor section (2) x_version xawtvrc s yast2 groups s ----- Execute audio alsa restore (3) store (3) background kill (21) run (4) run_output (12) run_output_err (6) curl easySSL ftp dir get (4) setUserPassword (2) ldap (5) bind (3) schema (2) passwd init (2) scpm enable first recover resources rebuild rollback sdconf (2) slp dereg reg subdomain (4) target bash (433) bash_background (10) bash_input bash_ouptut bash_output (240) control printer_reset insmod mkdir (45) modprobe (13) mount (18) remove (67) symlink (3) umount (18) tftp get put thinkfinger add-user cancel xml string ----- Read addon content REGISTERPRODUCT anyxml background buffer_out isrunning (6) newerr (4) newlines (13) newout (17) output_open (18) pid status (5) backup free_space (2) bluetooth hcid value device class iscan name pscan options passkey security boot vmlinuz_version complain content BASEPRODUCT BASEVERSION DISTPRODUCT (2) DISTVERSION FLAGS LABEL (2) LANGUAGE LINGUAS PATTERNS PRODUCT RELNOTESURL SHORTLABEL (2) VENDOR VERSION cron cups classes default_dest (2) last_error printers remote (4) dev tty etc cryptotab cups client_conf value ServerName default passwd crypt group_crypt fstab (5) inetd_conf services inittab ca install_inf AutoYaST BrokenModules Cdrom Cmdline DASD_Parameter InitrdModules Repair iscsid all mtab ntp_conf all (2) passwd resolv_conf domain nameserver process search shadow xinetd_conf services (6) yp_conf broadcast defaultbroadcast domainservers servers slp genprof (2) init insserv_conf scripts comment comments (2) current_runlevel default_runlevel (3) exists (9) runlevel (3) runlevel_list (3) runlevels kickstart ldap error schema at (2) oc (2) search (16) logparse (4) logprof (2) mail fetchmail accounts ldaptable postfix auth accounts sendmail auth accounts media content LINGUAS PATTERNS modules options net hostnames (7) samba showexports (2) passwd error (2) group pluslines passwd pluslines (2) shadow pluslines ppd db changed creation_status modelname (10) vendorname (8) file constraints open (9) options (6) ppdinfo (2) paper_size all sort_items probe architecture bios (3) bluetooth boot_arch (2) cdrom (13) cpu (3) disk (3) display dvb (2) fingerprint floppy (4) manual framebuffer has_pcmcia has_smp ide ieee1394ctrl is_uml is_xen isapnp keyboard manual memory (4) mouse netcard (3) pci (2) pppoe (2) printer scsi (2) sound (2) status storage (2) system (4) time_machines tv (2) uniqueid usb usbctrl proc cpuinfo value "0" "flags" (2) dasddev filesystems (2) meminfo (2) modules (12) mounts (8) parport devices swaps product features value reports_confined (3) reports_ess (3) reports_parse (6) reports_sched (6) root wgetrc proxy_passwd proxy_user routes run df (3) scpm error (2) exit_status rg (2) group_default group_map status slp findattrs findsrvs findsrvtypes unicastfindattrs smb queues subdomain subdomain_profiles (3) sysconfig SuSEfirewall2 FW_FORWARD_ALWAYS_INOUT_DEV amavis USE_AMAVIS backup RPMDB_BACKUP_DIR bluetooth (3) bootloader LOADER_TYPE (4) bootsplash THEME console CONSOLE_ENCODING CONSOLE_FONT CONSOLE_MAGIC CONSOLE_SCREENMAP CONSOLE_UNICODEMAP displaymanager DISPLAYMANAGER (5) DISPLAYMANAGER_AD_INTEGRATION DISPLAYMANAGER_AUTOLOGIN DISPLAYMANAGER_PASSWORD_LESS_LOGIN DISPLAYMANAGER_REMOTE_ACCESS hotplug HOTPLUG_USB_STATIC_MODULES ide DEVICES_FORCE_IDE_DMA irda IRDA_MAX_BAUD_RATE IRDA_PORT kernel INITRD_MODULES (4) MODULES_LOADED_ON_BOOT (2) language INSTALLED_LANGUAGES RC_LANG (4) RC_LC_MESSAGES ldap BASE_CONFIG_DN BIND_DN (2) FILE_SERVER lirc LIRC_MODULE mail CONFIG_TYPE FROM_HEADER MAIL_CREATE_CONFIG (2) SKIP_ASK SMTPD_LISTEN_REMOTE mouse MOUSEDEVICE network config NETWORKMANAGER dhcp DHCLIENT_MODIFY_NTP_CONF ntp NTPD_INITIAL_NTPDATE (2) NTPD_RUN_CHROOTED postfix POSTFIX_DIALUP POSTFIX_LOCALDOMAINS POSTFIX_MASQUERADE_DOMAIN POSTFIX_MDA POSTFIX_NODNS POSTFIX_RELAYHOST proxy FTP_PROXY HTTPS_PROXY (2) HTTP_PROXY (2) NO_PROXY PROXY_ENABLED (3) scpm BOOT_MODE DEBUG SWITCH_MODE VERBOSE security CHECK_SIGNATURES sendmail MASQUERADE_DOMAINS SENDMAIL_ARGS SENDMAIL_EXPENSIVE SENDMAIL_LOCALHOST SENDMAIL_NOCANONIFY SENDMAIL_SMARTHOST SMTP_AUTH_MECHANISMS sound LOAD_SEQUENCER suseconfig ENABLE_SUSECONFIG sysctl ENABLE_SYSRQ IP_FORWARD windowmanager "DEFAULT_WM" DEFAULT_WM (2) ypbind YPBIND_BROADCAST YPBIND_BROKEN_SERVER YPBIND_LOCAL_ONLY YPBIND_OPTIONS ypserv YPPWD_SRCDIR target dir (29) etc cryptotab fstab lstat (10) size (144) stat (22) string (84) symlink (4) tmpdir (76) yast2 (23) ycp (34) thinkfinger exit_status (3) state udev_persistent drivers net xauth key xml (3) error_message xmlrepos zypp_repos ----- Write FvwmCommand lang background buffer_size backup file_append (3) bluetooth hcid complain cron cups classes add remove default_dest (2) printers add remove dev tty nocr prompt (2) stderr stderr_nocr etc cups client_conf (2) value ServerName cupsd_conf (2) printers_conf default passwd defaultdomain fstab hosts imapd_conf (2) allowplainwithouttls inetd_conf services inittab (5) ca (3) id (2) x0 install_inf iscsid (2) all krb5_conf ldap_conf nsswitch_conf (4) ntp_conf pam_pkcs11_conf resolv_conf shadow root ssh ssh_config xinetd_conf services (4) yp_conf firewall_service_definition genprof (14) init scripts default_runlevel ldap add delete modify (3) logparse logprof (14) mail fetchmail postfix auth accounts sendmail auth accounts modprobe_newid modprobe_sound modprobe_tv modules (3) network passwd group pluslines groups passwd pluslines shadow users ppd db check_method (2) create file modify (3) probe status configured (6) product features reports_sched (3) reportsched root curlrc (2) wgetrc (2) proxy_passwd proxy_user routes scpm subdomain_profiles reload sudo (2) sysconfig SuSEfirewall2 amavis USE_AMAVIS apache bluetooth (3) bootloader clock console displaymanager (5) DISPLAYMANAGER DISPLAYMANAGER_AD_INTEGRATION DISPLAYMANAGER_AUTOLOGIN DISPLAYMANAGER_PASSWORD_LESS_LOGIN DISPLAYMANAGER_REMOTE_ACCESS DISPLAYMANAGER_ROOT_LOGIN_REMOTE hardware (3) hotplug ide irda (3) IRDA_PORT (2) joystick kernel (4) INITRD_MODULES (2) MODULES_LOADED_ON_BOOT keyboard (2) COMPOSETABLE KBD_CAPSLOCK KBD_DELAY KBD_DISABLE_CAPS_LOCK KBD_NUMLOCK KBD_RATE KBD_SCRLOCK KBD_TTY KEYTABLE YAST_KEYBOARD comment language ldap lirc (3) LIRC_MODULE (2) mail FROM_HEADER MAIL_CREATE_CONFIG SMTPD_LISTEN_REMOTE mouse network dhcp (2) DHCLIENT_MODIFY_NTP_CONF providers (2) ntp postfix POSTFIX_LOCALDOMAINS POSTFIX_MASQUERADE_DOMAIN POSTFIX_MDA POSTFIX_RELAYHOST POSTFIX_SMTP_AUTH printer proxy (3) FTP_PROXY (2) HTTPS_PROXY HTTP_PROXY (2) NO_PROXY PROXY_ENABLED security sendmail MASQUERADE_DOMAINS SENDMAIL_ARGS (2) SENDMAIL_LOCALHOST SENDMAIL_SMARTHOST SMTP_AUTH_MECHANISMS slmodemd sound LOAD_SEQUENCER suse_register SUBMIT_HWDATA SUBMIT_OPTIONAL suseconfig sysctl windowmanager (2) DEFAULT_WM KDE_USE_IPV6 ypbind syseditor target byte passwd cyrus string (59) ycp (39) udev_persistent drivers net rules rules_comment xauth key --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thu, 15 Nov 2007, Klaus Kaempf wrote:
I scanned all files below /usr/share/YaST2/{modules,clients,include} grepping for "SCR::". Just to get statistical relevant data, not for complete coverage.
The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future.
May be a dumb question, but which problems are we trying to fix? Also, are you suggesting a completely different SCR(-like) approach or just "fixed" and more unified paths? Thanks, Michal -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Michal Svec
On Thu, 15 Nov 2007, Klaus Kaempf wrote:
I scanned all files below /usr/share/YaST2/{modules,clients,include} grepping for "SCR::". Just to get statistical relevant data, not for complete coverage.
The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future.
May be a dumb question, but which problems are we trying to fix?
I see sevaral problems - Code cleanup / refactoring SCR is not fully understood by developers (coding all kinds of workarounds) and incomplete in some regards (developers parsing files in ycp). This should be fixed. - No / Inconsistent modeling The pathes and data structures used in SCR effectively define a model. There is no clear documentation nor consistency in this model. Should we make the SCR model consistent or pick up an existing one (i.e. HAL for hardware probing or CIM for everything) - Reuse of existing code For historical reasons (non-GPL license of YaST), SCR agents don't use existing implementations for instrumentation. For Code11, we have the requirement of 'friendly coexistance' with CIM instrumentation. A resonable combination would be to replace agents with existing CIM provider code. - Separation of rights Security and 'role based' considerations recommend to separate the controller code (WFM in YaST) from the backend (SCR in YaST). The controller code should run without root rights, the backend code should assume root rights on demand (i.e. rpm -qa does not need root). This requires a redesign of the SCR backend.
Also, are you suggesting a completely different SCR(-like) approach or just "fixed" and more unified paths?
Thats what I'm trying to find out and get more input from developers. The current thinking is to implement a completely different approach while keeping the current SCR in place and migrate modules one-by-one. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
--------------------------------------------------
From: "Klaus Kaempf"
* Michal Svec
[Nov 15. 2007 18:05]: On Thu, 15 Nov 2007, Klaus Kaempf wrote:
I scanned all files below /usr/share/YaST2/{modules,clients,include} grepping for "SCR::". Just to get statistical relevant data, not for complete coverage.
The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future.
May be a dumb question, but which problems are we trying to fix?
I see sevaral problems
- Code cleanup / refactoring SCR is not fully understood by developers (coding all kinds of workarounds) and incomplete in some regards (developers parsing files in ycp). This should be fixed.
- No / Inconsistent modeling The pathes and data structures used in SCR effectively define a model. There is no clear documentation nor consistency in this model. Should we make the SCR model consistent or pick up an existing one (i.e. HAL for hardware probing or CIM for everything)
- Reuse of existing code For historical reasons (non-GPL license of YaST), SCR agents don't use existing implementations for instrumentation. For Code11, we have the requirement of 'friendly coexistance' with CIM instrumentation. A resonable combination would be to replace agents with existing CIM provider code.
- Separation of rights Security and 'role based' considerations recommend to separate the controller code (WFM in YaST) from the backend (SCR in YaST). The controller code should run without root rights, the backend code should assume root rights on demand (i.e. rpm -qa does not need root). This requires a redesign of the SCR backend.
Also, are you suggesting a completely different SCR(-like) approach or just "fixed" and more unified paths?
Thats what I'm trying to find out and get more input from developers.
The current thinking is to implement a completely different approach while keeping the current SCR in place and migrate modules one-by-one.
Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
From experience, SCRs are just plain hard to use unless you are a rocket scientist. Writing and consuming SCRs (or their potential replacement) should be a lot easier and more "fun".
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Justin Haygood
From experience, SCRs are just plain hard to use unless you are a rocket scientist. Writing and consuming SCRs (or their potential replacement) should be a lot easier and more "fun".
Agreed ! And I forgot one more point in my list: - Object orientation The 'backend api' should pick up properties of object-orientation. Examples: Old New --- --- value = SCR::Read( .foo.bar ) -> value = client.foo.bar SCR::Write( .foo.bar, value ) -> client.foo.bar = value SCR::Execute( .foo.bar, v1, v2) -> client.foo.bar( v1, v2 ) I think this fulfills the 'easy' and 'fun' requirements ;-) Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf napsal(a):
* Justin Haygood
[Nov 15. 2007 19:06]: From experience, SCRs are just plain hard to use unless you are a rocket scientist. Writing and consuming SCRs (or their potential replacement) should be a lot easier and more "fun".
Agreed !
And I forgot one more point in my list:
- Object orientation The 'backend api' should pick up properties of object-orientation. Examples:
Old New --- --- value = SCR::Read( .foo.bar ) -> value = client.foo.bar SCR::Write( .foo.bar, value ) -> client.foo.bar = value SCR::Execute( .foo.bar, v1, v2) -> client.foo.bar( v1, v2 )
I think this fulfills the 'easy' and 'fun' requirements ;-)
Sounds great! Nevertheless I don't see *any* benefit when comparing to the current implementation. What I see are these drawbacks: * Broken backward compatibility - and we know we need backward compatibility in such important tasks as access to system is. We just can't rewrite the whole YaST overnight (OES, SLEPOS, ...). * Confuses developers - currently we have clearly written: 'Read', 'Write', 'Execute' or 'Dir'. The proposal of replacement for SCR::Read vs. SCR::Execute is almost the same: any cmd_out = client.foo.bar ( v1 ) any value = client.foo.bar any cmd_out = SCR::Execute (.foo.bar, v1) any value = SCR::Read (.foo.bar) * It's not a fun to rewrite all the existing code :) ;) and it's not easy either! ;) The current SCR implementation expects caching the changed values, all are written to disk at once to make it faster. I don't see any clear /object-oriented/ syntax to rewrite it to be still understandable. Anyway, if we are talking about SCR -> 'client', WFM would need to be 'system' or something similar. Which, on the other hand, would bring another confusedness. IMO: All in all, this is not worth changing. But please, convince me it is. Bye Lukas PS: The current documentation of SCR agents is generated from sources for every release. See these pages, for instance: SCR: http://forgeftp.novell.com/yast/doc/SL10.3/scr/index.html http://forgeftp.novell.com/yast/doc/SL10.3/scr/136.root.wgetrc.html http://forgeftp.novell.com/yast/doc/SL10.3/scr/152.sysconfig.SuSEfirewall2.h... SCR how-to document: http://forgeftp.novell.com/yast/doc/SL10.3/tdg/documentation_SCR.html -- Lukas Ocilka, YaST Developer (xn--luk-gla45d) ----------------------------------------------------------------- SUSE LINUX, s. r. o., Lihovarska 1060/12, Praha 9, Czech Republic
* Lukas Ocilka
Sounds great!
Nevertheless I don't see *any* benefit when comparing to the current implementation.
For an experienced YaST developer doing single systems management and not taking Code11 requirements into account, I fully agree. There is no benefit. But I do see (as mentioned yesterday), code cleanup, consistent modeling, reuse of existing code, separation of rights and object orientation as huge benefits.
What I see are these drawbacks:
* Broken backward compatibility - and we know we need backward compatibility in such important tasks as access to system is. We just can't rewrite the whole YaST overnight (OES, SLEPOS, ...).
Let me cite my previous mails "The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future." and "The current thinking is to implement a completely different approach while keeping the current SCR in place and migrate modules one-by-one."
* Confuses developers - currently we have clearly written: 'Read', 'Write', 'Execute' or 'Dir'. The proposal of replacement for SCR::Read vs. SCR::Execute is almost the same:
any cmd_out = client.foo.bar ( v1 ) any value = client.foo.bar
any cmd_out = SCR::Execute (.foo.bar, v1) any value = SCR::Read (.foo.bar)
So what do you propose ?
* It's not a fun to rewrite all the existing code :) ;) and it's not easy either! ;)
See above.
The current SCR implementation expects caching the changed values, all are written to disk at once to make it faster. I don't see any clear /object-oriented/ syntax to rewrite it to be still understandable.
Thats an important aspect. Thanks for bringing it up.
Anyway, if we are talking about SCR -> 'client', WFM would need to be 'system' or something similar. Which, on the other hand, would bring another confusedness.
We already have this distinction with SCR::Read(.target ...) and WFM::Read(.local ...) ?!
IMO: All in all, this is not worth changing. But please, convince me it is.
I'll try ;-) Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
I agree with Klaus here, one thing is about the CIM and WBEM tools and the other is reinventing our own model. The CIM model is quite complete, and we should try to come up with something following its philosophy. About SCR, yes, creating agents is not something intuitive, specially if it is not a simple inherited ini file agent, but a full YaST component. After all the interesting we discussed with Klaus during the week, I have been thinking a lot into all those problems, and started looking for solutions. For example, playing with a little of Ruby sugar, I managed to replicate SCR in a interesting way: Lets see how do I define an agent: Plugin.define "release_agent" do author "Duncan" version "1.0.0" extends :agent run_before :other def read(path) if path == :'.system.product.edition' f = File.open('/etc/SuSE-release', 'r') f.each_line do |l| return l end return "" end end def supports_path?(path) return path == :'.system.product.edition' end end puts SCR::read(:'.system.product.edition') done. Why is it so hard with our tools, because we reinvented everything. (Note, the example implementation of a SCR engine is 26 lines of code, not shown above) Note: the above example is even compatible with the old scr, as any path is passed down to the old SCR. Require the wbem module and you can add wbem access, require drb and you can call distributed code. Now, our main problem is that we have to interact with quite a lot of code in different languages, ages, paradigms. We have our own component model, but it is quite complex. We could go our way and implement all the YaST basic core in Ruby or Python and add nice stuff like WBEM access, access to services in the web, etc, but we need a nice way to reuse and use functionality from C/C++ code, Python, Perl, etc, and the other way around. Especially if we are dealing with the system, you don't want the developers to learn how to create ruby extensions or python modules just to interface with some low level library. We depend or will depend on that (if we plan to ditch everything inhouse that is a reinvention). We have that component model right now (liby2) but try to create a component yourself, isn't that the reason why libstorage uses generated perl swig bindings, to interact to the component model via the super complex perl-bindings. I was giving a look at solutions out there. One I found was OASIS Service Component Architecture / C and C++ (SCA-C-C++) which has a implementation by Apache called Tuscany, already in the 1.0 Milestone3. Its a service model, more oriented to web services but supporting local components. The approach is pretty simple, a service in c++ is just a .h defining the interface, the implementation, and a wsdl file. You can implement them in python and ruby (services and clients) and that is supported by the runtime out of the box. There is an article at IBM DeveloperWorks [1]. Going back to SCR. I don't think the syntax sugar is very important, but how we use existing knowledge there. The CIM model is a place to start, but there are also issues that are not intuitive. The CIM model is just a OO way of looking the system, where you ask for instances of a class, and then use the objects properties and methods. If you ask the CIMOM for the instances of CIM_UnixFile, you get the root tree /, in my experiments, I had no clue how to go forward and do _SIMPLE_ stuff like reading, globing, etc. (not to mention it took 10 seconds to read 10 directories in / but probably it was ruby::wbem fault). However, stuff like getting the numbers of CPU, the installed products, etc. CIM provides a model much more consistent than the low level greps of /proc and the package bindings, but some models like accessing files are not nice. (An argument could be that we should not access files, but I am not sure about that). The big question when prototyping all the ideas floating out there is, how to move on. Now there is some momentum, and the right time for other pieces (for example, the great YaST UI being decoupled). If anyone has a concrete experiment to try next, speak on! :-) Duncan [1]: http://www.ibm.com/developerworks/webservices/library/ws-soa-capisca1/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Duncan Mac-Vicar P.
I agree with Klaus here, one thing is about the CIM and WBEM tools and the other is reinventing our own model. The CIM model is quite complete, and we should try to come up with something following its philosophy.
If we agree to refine (redefine?!) our backend model, I strongly believe the CIM model is the way to go. Maybe not all of it [*], but those parts we pick from it must be 100% compatible with CIM. [*] No, I do not know which parts to take and which to leave behind. Thats what this discussion thread if for ;-) [... nice Ruby approach removed for readability ...]
Note: the above example is even compatible with the old scr, as any path is passed down to the old SCR.
Is 'compatibility with old SCR' a desirable property ? How much would this please current developers ? How much would this scare new ones away ? Finding the balance between 'everything shiny and new' and 'keep it as it is' is important. What do others think ? [...]
Especially if we are dealing with the system, you don't want the developers to learn how to create ruby extensions or python modules just to interface with some low level library. We depend or will depend on that (if we plan to ditch everything inhouse that is a reinvention).
Being able to easily use existing (low level) libraries for system access is very imporant from my POV. [...]
Going back to SCR. I don't think the syntax sugar is very important, but how we use existing knowledge there.
Given that we want to replace YCP with a object-oriented scripting language, the syntactic sugar comes almost for free.
The CIM model is a place to start, but there are also issues that are not intuitive. The CIM model is just a OO way of looking the system, where you ask for instances of a class, and then use the objects properties and methods.
Thats why we need a layer on top to shield the details of the model implementation from yast module developers.
If you ask the CIMOM for the instances of CIM_UnixFile, you get the root tree /, in my experiments, I had no clue how to go forward and do _SIMPLE_ stuff like reading, globing, etc. (not to mention it took 10 seconds to read 10 directories in / but probably it was ruby::wbem fault).
Using WBEM for local operations is not the way to go. Don't mix problems of a WBEM implementation with the model aspects of CIM.
However, stuff like getting the numbers of CPU, the installed products, etc. CIM provides a model much more consistent than the low level greps of /proc and the package bindings, but some models like accessing files are not nice. (An argument could be that we should not access files, but I am not sure about that).
Given the right instrumentation, file access is rarely needed. Most config files are covered by the model and provides objects for access. Where (raw) file access is needed, it should follow the posix model and abandon CIM (if its really that bad ;-)) The 'scr statistics' posted before should give a hint if and where file access is needed.
The big question when prototyping all the ideas floating out there is, how to move on. Now there is some momentum, and the right time for other pieces (for example, the great YaST UI being decoupled).
If anyone has a concrete experiment to try next, speak on! :-)
I'd like to look into a nice and useful backend api (replacing SCR) first and try different transports: 1. instsys system, directly using libraries (resp. cim providers) 2. policy kit system, with separation of rights 3. distributed system, ws-man transport to remote client The transport is completely transparent at the api level. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Friday 16 November 2007 10:11:49 am Lukas Ocilka wrote:
Nevertheless I don't see *any* benefit when comparing to the current implementation. What I see are these drawbacks:
I agree, we should not focus on the syntax sugar, but on the model.
* Broken backward compatibility - and we know we need backward compatibility in such important tasks as access to system is. We just can't rewrite the whole YaST overnight (OES, SLEPOS, ...).
Yes, we can. Released products use released version of YaST, that we have to maintain, but we have to maintain it anyways as much as we maintain the old package manager library which is a different approach as SLES. We should not. Rewrites aren't good ( http://www.joelonsoftware.com/articles/fog0000000069.html ) but one thing is renewing our platform, the other is rewriting. You can write new ways to use the platform, and reuse old code (like SCR agents for example).
* It's not a fun to rewrite all the existing code :) ;) and it's not easy either! ;)
We don't want to rewrite. But we don't want to rethink anything too. We have human barriers in the product. We, the developers, are so used our smelly bunch of tools and base technology, that we refuse to think on a platform other people would like to use too. Can we enable other to use YaST and at the same time keep our users saying that YaST rock? I think we can.
The current SCR implementation expects caching the changed values, all are written to disk at once to make it faster. I don't see any clear /object-oriented/ syntax to rewrite it to be still understandable.
I don't consider the syntax sugar important at this stage, and you are right, sometimes adding OO without reason can transform something simple into something verbose. I see the OO power more important in the agent development (see my other post).
Anyway, if we are talking about SCR -> 'client', WFM would need to be 'system' or something similar. Which, on the other hand, would bring another confusedness.
Lets try to brainstorm this in the other way, instead of finding out why something will not work, lets try to find a _different_ approach that would work.
IMO: All in all, this is not worth changing. But please, convince me it is.
Just try the exercise of trying to explain somebody how to create an agent which is not based on the sysconfig or ini one.
PS: The current documentation of SCR agents is generated from sources for every release. See these pages, for instance:
SCR: http://forgeftp.novell.com/yast/doc/SL10.3/scr/index.html http://forgeftp.novell.com/yast/doc/SL10.3/scr/136.root.wgetrc.html http://forgeftp.novell.com/yast/doc/SL10.3/scr/152.sysconfig.SuSEfirewall2. html
SCR how-to document: http://forgeftp.novell.com/yast/doc/SL10.3/tdg/documentation_SCR.html
You see that every agent documentation is one line, and how to create an agent is a copy paste of a ini based agent, which confirms my theory that we are unable to explain humans how to do anything more complex than that :-) Duncan -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thursday 15 November 2007 18:58, Justin Haygood wrote:
From experience, SCRs are just plain hard to use unless you are a rocket scientist. Writing and consuming SCRs (or their potential replacement) should be a lot easier and more "fun".
I couldn't agree more.
CU
--
Stefan Hundhammer
Dne Thursday 15 of November 2007 18:35:23 Klaus Kaempf napsal(a):
* Michal Svec
[Nov 15. 2007 18:05]: On Thu, 15 Nov 2007, Klaus Kaempf wrote:
I scanned all files below /usr/share/YaST2/{modules,clients,include} grepping for "SCR::". Just to get statistical relevant data, not for complete coverage.
The goal is to get relevant data for a SCR redesign to be implemented in parallel to the current SCR and have modules converted over time and shut down SCR is some distant future.
May be a dumb question, but which problems are we trying to fix?
I see sevaral problems
- Code cleanup / refactoring SCR is not fully understood by developers (coding all kinds of workarounds) and incomplete in some regards (developers parsing files in ycp). This should be fixed.
- No / Inconsistent modeling The pathes and data structures used in SCR effectively define a model. There is no clear documentation nor consistency in this model. Should we make the SCR model consistent or pick up an existing one (i.e. HAL for hardware probing or CIM for everything)
- Reuse of existing code For historical reasons (non-GPL license of YaST), SCR agents don't use existing implementations for instrumentation. For Code11, we have the requirement of 'friendly coexistance' with CIM instrumentation. A resonable combination would be to replace agents with existing CIM provider code.
- Separation of rights Security and 'role based' considerations recommend to separate the controller code (WFM in YaST) from the backend (SCR in YaST). The controller code should run without root rights, the backend code should assume root rights on demand (i.e. rpm -qa does not need root). This requires a redesign of the SCR backend.
Also, are you suggesting a completely different SCR(-like) approach or just "fixed" and more unified paths?
Thats what I'm trying to find out and get more input from developers.
The current thinking is to implement a completely different approach while keeping the current SCR in place and migrate modules one-by-one.
This is something which we already tried with LiMaL. The actual result is that we have two "standard" ways to access system. If we decide for any new approach, we should decide for an existing standard. With the requirement for code reuse, CIM seems to me to be the way to go provided we get reasonably over the coding overhead. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Freitag, 16. November 2007, Jiri Srain wrote:
Dne Thursday 15 of November 2007 18:35:23 Klaus Kaempf napsal(a): [..]
Thats what I'm trying to find out and get more input from developers.
The current thinking is to implement a completely different approach while keeping the current SCR in place and migrate modules one-by-one.
This is something which we already tried with LiMaL. The actual result is that we have two "standard" ways to access system.
If we decide for any new approach, we should decide for an existing standard. With the requirement for code reuse, CIM seems to me to be the way to go provided we get reasonably over the coding overhead.
One of LiMaL's original goals was to make it a layer below CIM, and other higher level management tools (YaST/SCR). Maybe you can think of it as a convenience library to ease the creation of CIM providers while additionally allowing to manage the (local) system without CIM. (Ok, it probably failed with that. For whatever reasons ;)) But IMO using CIM everywhere will create a huge overhead on a local system. -- just my €0.02, Ralf -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Ralf Haferkamp
One of LiMaL's original goals was to make it a layer below CIM, and other higher level management tools (YaST/SCR). Maybe you can think of it as a convenience library to ease the creation of CIM providers while additionally allowing to manage the (local) system without CIM.
Agreed.
But IMO using CIM everywhere will create a huge overhead on a local system.
Please don't confuse CIM (the model) with WBEM (talking to a CIMOM). The overhead of the latter should be avoided. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Jiri Srain
This is something which we already tried with LiMaL. The actual result is that we have two "standard" ways to access system.
Not quite. SCR - with its agents - is covering different instrumentation aspects than LiMaL. And LiMaL, being a 'collection of convenience libraries' exists with libsax, libbootloader, libstorage, libzypp, ... Whats desperately missing is a common model and API consistency.
If we decide for any new approach, we should decide for an existing standard. With the requirement for code reuse, CIM seems to me to be the way to go provided we get reasonably over the coding overhead.
Fully agreed. Esp. in the areas of modeling and API consistency, CIM has everything we need. And I'm talking about the CIM model and CIM object orientation here, not(!) about coding against CIM(OM) client libs. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (9)
-
Duncan Mac-Vicar P.
-
Jiri Srain
-
Justin Haygood
-
kkaempf@suse.de
-
Klaus Kaempf
-
Lukas Ocilka
-
Michal Svec
-
Ralf Haferkamp
-
Stefan Hundhammer