[sos-devel] [PATCH 2/2] [ovirt_hosted_engine] new plugin for oVirt
Sandro Bonazzola
sbonazzo at redhat.com
Tue Aug 19 10:37:29 UTC 2014
Il 19/08/2014 12:23, Bryn M. Reeves ha scritto:
> On Tue, Aug 19, 2014 at 11:05:37AM +0200, Sandro Bonazzola wrote:
>> The oVirt Hosted Engine packages allow to run
>> ovirt-engine inside a VM. This plugin provides
>> info about the setup and the high availability daemons
>> running such VM.
>
> This comment seems to have been copied from an old version of the example
> plugin (example_plugins/example.py):
>
>> +# Class name must be the same as file name and method names must not change
>> +class OvirtHostedEngine(Plugin, RedHatPlugin):
>
> There's no need for it in this file.
I'll remove it.
>
>> + # Add configuration files
>> + self.add_copy_specs([
>> + '/etc/ovirt-hosted-engine/',
>> + '/etc/ovirt-hosted-engine-ha/',
>> + '/etc/ovirt-hosted-engine-setup.env.d/'
>> + ])
>
> See the comments in Issue #364: "It'd also be good to have some example
> tarballs representing the raw content of /etc/ovirt-hosted-engine/ and
> /etc/ovirt-hosted-engine-ha/ for review and testing (esp. if these are similar
> to the other ovirt config directories in terms of having secrets scattered
> around multiple files)."
I'll attach a sample when I'll send the updated plugin.
>
> I'd rather we did not collect whole directories at all and if we're going to
> then we need to have good justification for it and record that.
>
>> + # Add ovirt-hosted-engine-setup log files
>> + self.add_copy_specs([
>> + '/var/log/ovirt-hosted-engine-setup/'
>> + ])
>
> Again, we're trying to avoid whole directory copying, especially in /var.
>
> There is nothing to prevent something dumping GiBs of data under this
> path and the above code will faithfully attempt to copy it all. This
> needs a more restrictive path and also ideally size limiting (an
> alternative would be to move the whole thing under and 'if
> get_option("all_logs")' branch).
Ok
>
>> + # Add ovirt-hosted-engine-ha logs, limiting the size
>> + self.add_copy_spec_limit(
>> + '/var/log/ovirt-hosted-engine-ha/*.log',
>> + sizelimit=self.limit,
>> + reverse_order=True
>> + )
>
> The trend with recent plugin changes has been to only collect a single
> (current) log file by default and to make all the rotated copies subject
> to a non-default 'all_logs' option. I'm fine with keeping this as-is if
> the rotated versions are really crucial for oVirt's needs but if not I'd
> like to keep things as consistent as possible.
Ok, thanks for the specs, I'll try to adapt the plugin to this convention.
>
> Regards,
> Bryn.
>
--
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
More information about the sos-devel
mailing list