Comments (11)
I think that probably the right way to do this under the new architecture is to have a *nix policy from which Redhat and Debian should extend. Then within the plug-ins that are *nixish you put the common parts into an inner class and the distro specific parts into distro specific classes that extend the base class. Very OOPish.
I'm wondering how the new class loader would handle it though. Need to try it and see.
linux policy
/
Deb Rhat policy
from sos.
I like that idea, I think my main concern with the plugins now is that when you do a sosreport -l you'll see something like:
general does not validate basic system information
generalubuntu does not validate Basic system information for Ubuntu based distributions
Or
autofs
autofsubuntu
And some of the changes to the plugin may only require checking additional files or different file locations to capture the data.
from sos.
Yeah, that's ugly. Autofs should appear as "autofs" whether it's Ubuntu or Fedora.
from sos.
I agree. Is there a public channel where you guys hangout at so we could possibly have a meeting to discuss some of these cross-distribution type ideas?
from sos.
[email protected] is probably the correct place for this discussion.
With regards to the original issue raised here, I think adding a method to the PackageManager interface makes sense in this case.
Platform specific versions of plugins should all have the same name. You can ensure this by defining a name() method on your plugin subclass.
We may want to change the Plugin superclass name() behavior from
return class.__name__.lower()
to
return class.__module__.lower()
That way it will be named after the module that contains the class by default (and to better adhere to DRY.)
I'm beginning to think that sosreport -l needs to be tweaked to hide plugins that are excluded because of platform issues unless you pass in a -v as well.
from sos.
I attempted to add the name routine to my plugins but then there were not being listed as existing at all. I'll look into changing the name routine to your suggestion and see if that makes a difference
from sos.
I'd be interested in seeing what you have seen. What you describe sounds like a bug.
from sos.
We now have an IRC channel on OFTC.
irc.oftc.net
#sosreport
To Jessie, yah that makes sense. There is; however, still the ugly bit of hard-coded distro specific programs within plug-ins.
from sos.
In verbose mode I dont see anything printed to stdout other than the plugins not showing up in --list-plugins
from sos.
I was suggesting we change the behavior of --list-plugins to only display plugins for the current distribution unless we also pass in -v.
I think that plugins are where the distro specific shell outs belong in many cases, package manager aside (since we have a ready abstraction for that). I would not be surprised if we come across more things that make sense to abstract away as we cover more platforms and distributions, and it makes sense to add those things as we discover them.
from sos.
I think we can close this since we've reworked the plugin infrastructure and I dont really see a pressing need to have this extra layer/routine.
from sos.
Related Issues (20)
- cleaner does not obfuscate entire passwords that have spaces HOT 3
- [ipa] missing /var/log/ipaserver-enable-sid.log
- collect --clean run on two sosreports of the same system hangs (or segfaults) HOT 2
- [ipa] missing /var/log/ipaepn.log
- Request to be a member of the project from Canonical/Ubuntu perspective HOT 3
- [grafana] Collect data for snap installation
- Some MAAS config files missing from collection HOT 3
- [tests] FullCleanTest.test_private_map_was_generated timeouts when running in container HOT 5
- [man] Update maintainer mail address HOT 4
- Add Openstack Sunbeam plugin
- do_file_sub error with "global flags not at the start of the expression at position 1" for juju plugin on ubuntu HOT 8
- Error when collecting sosreport from live environment: `Could not enumerate network devices: [Errno 2] No such file or directory: '/mnt/sys/class/net'` HOT 21
- python 3.12: sos crashes because of `ConfigParser`
- Usage of deprecated python API
- ceph_osd is triggered on mon/mgr nodes , and mon/mgr plugins are triggered on osd nodes HOT 2
- Add exclude of application core dumps in all directories. HOT 5
- Fix PEP706 warning HOT 6
- containerd plugin does not enable when containerd is installed from docker repo
- ubuntu plugin loads "tls" module HOT 1
- sos report can load overlay kmod HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sos.