Re: [PATCH v2 3/3] nodedev: Don't fail device enumeration if MDEVCTL is missing

2021-04-13 Thread Erik Skultety
issing on some systems (e.g. mine) in which case we > should just skip the update of mdevs instead of failing whole > device enumeration. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Erik Skultety

Re: [PATCH v2 2/3] nodedev: Mark device initialization complete even in case of an error

2021-04-13 Thread Erik Skultety
e thread is > quitting anyway) and let the APIs proceed. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Erik Skultety

Re: [PATCH v2 1/3] nodedev: Wait for device initialization in all public API callbacks

2021-04-13 Thread Erik Skultety
from or adding them to the internal list of devices (among with > their states). > > Therefore, wait for things to settle down before proceeding with > nodeDeviceCreate(). s/nodeDeviceCreate/any of the APIs. Reviewed-by: Erik Skultety

Re: [PATCH 6/6] nodedev: Don't fail device enumeration if MDEVCTL is missing

2021-04-13 Thread Erik Skultety
On Tue, Apr 13, 2021 at 05:33:49PM +0200, Michal Privoznik wrote: > On 4/13/21 4:58 PM, Erik Skultety wrote: > > On Tue, Apr 13, 2021 at 12:01:57PM +0200, Michal Privoznik wrote: > > > After all devices were enumerated, the enumeration thread call > > > nodeDeviceUpdateM

[libvirt PATCH] nodedev: Fix possible NULL pointer dereference on vfiogroup opening

2021-04-13 Thread Erik Skultety
it more readable after adding the NULL pointer condition. Note that error is not reported in this patch, because if @vfiogroup is NULL, then it must have been a system error which was already reported by the called function. Don't get confused by virMediatedDeviceGetIOMMUGroupDev returning NU

Re: [PATCH 01/15] news: make SEV attrs 'cbitpos' & 'reducedPhysBits' optional

2021-04-13 Thread Erik Skultety
On Tue, Apr 13, 2021 at 03:08:31PM +0800, Han Han wrote: > Signed-off-by: Han Han > --- > NEWS.rst | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index 0a34798483..350459266c 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -421,6 +421,13 @@ v6.9.0 (2020-11-02

Re: [PATCH 6/6] nodedev: Don't fail device enumeration if MDEVCTL is missing

2021-04-13 Thread Erik Skultety
On Tue, Apr 13, 2021 at 12:01:57PM +0200, Michal Privoznik wrote: > After all devices were enumerated, the enumeration thread call > nodeDeviceUpdateMediatedDevices() to refresh the state of > mediated devices. This means that 'mdevctl' will be executed. But > it may be missing on some systems (e.g

Re: [PATCH 1/6] nodedev: Rename nodeDeviceWaitInit()

2021-04-13 Thread Erik Skultety
alization. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Erik Skultety

Re: [PATCH 2/6] nodedev: Wait for device initialization in nodeDeviceCreate()

2021-04-13 Thread Erik Skultety
On Tue, Apr 13, 2021 at 12:01:53PM +0200, Michal Privoznik wrote: > Although I have not experienced this in real life, there is a > possible race condition when creating new device. If the nodedev > driver is still enumerating devices (in a separate thread) and > virNodeDeviceCreate() is called the

Re: [PATCH 4/6] nodedev: Introduce nodeDeviceInitComplete()

2021-04-13 Thread Erik Skultety
On Tue, Apr 13, 2021 at 12:01:55PM +0200, Michal Privoznik wrote: > When the device enumeration thread finishes it sets the > driver->initialized boolean and signals condition to wake up > other threads that are waiting for the initialization to > complete. Move this code into a separate function s

Re: [PATCH 3/6] nodedev: Signal initCond with driver locked

2021-04-13 Thread Erik Skultety
d by the > thread calling pthread_cond_broadcast() or > pthread_cond_signal(). > > Therefore, broadcast the initCond while the nodedev driver is > still locked. It is consistent with what we do elsewhere. Reviewed-by: Erik Skultety

Re: [libvirt PATCH 00/11] Some additional cleanups to mdev support

2021-04-12 Thread Erik Skultety
change any behavior (aside > from switching to using the long commandline options when executing mdevctl). > > Erik Skultety (4): > nodedev: driver: Swap virMdevctlStart and virMdevctlCreate > nodedev: driver: Introduce internal mdevctl commands enum > nodedev: driver: Create

Re: [PATCH 1/1] Signed-off-by: Jiadong Zeng

2021-04-11 Thread Erik Skultety
On Fri, Apr 09, 2021 at 12:14:11PM +0800, 2860939...@qq.com wrote: > From: Jiadong Zeng Please send an email with a subject that actually reflects/summarizes what the patch is actually about. Regards, Erik

Re: [libvirt PATCH] vsh: fix memory leak in vshCommandParse

2021-04-07 Thread Erik Skultety
On Wed, Apr 07, 2021 at 05:29:50PM +0200, Ján Tomko wrote: > One of the error branches used a plain free where vshCommandFree > was required. > > https://bugzilla.redhat.com/show_bug.cgi?id=1943415 > > Signed-off-by: Ján Tomko > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 00/30] Add support for persistent mediated devices

2021-04-06 Thread Erik Skultety
On Thu, Apr 01, 2021 at 10:18:45AM -0500, Jonathon Jongsma wrote: > On Wed, 31 Mar 2021 16:00:48 +0200 > Erik Skultety wrote: > > > On Fri, Mar 26, 2021 at 11:47:56AM -0500, Jonathon Jongsma wrote: > > > This patch series follows the previously-merged series which

Re: [libvirt PATCHv2] docs: secret: do not use a valuable password

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 02:54:54PM +0200, Ján Tomko wrote: > Our website displays " **" as the example password. > Despite its tradition rooted in 18th Century French literature, > we cannot assume it to be public. > > Use *** as suggested by Erik instead. > > Signed-off-by: Ján Tomko

Re: [libvirt PATCH 5/4] meson: Don't check whether /usr/local/bin/grep is GNU grep

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 02:17:14PM +0200, Andrea Bolognani wrote: > Since /usr/local is where ports live, it's reasonable to assume > that a grep binary found in there will have been installed via > ports and will thus be GNU grep. > > Suggested-by: Erik Skultety >

Re: [libvirt PATCH] docs: secret: do not use a valuable password

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 02:02:01PM +0200, Ján Tomko wrote: > Our website displays " **" as the example password. > Despite its tradition rooted in 18th century French literature, > we cannot assume it to be public. > > Use a random string of letters and numbers instead. > > Signed-off-by:

Re: [libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 11:51:15AM +0200, Andrea Bolognani wrote: > On Thu, 2021-04-01 at 11:23 +0200, Erik Skultety wrote: > > Please squash this in before merging: > > > > diff --git a/build-aux/meson.build b/build-aux/meson.build > > index 1095982397..e491bdeebc

Re: [PATCH] docs: formatnetworkport: Fix typos

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 11:55:42AM +0800, Han Han wrote: > Signed-off-by: Han Han > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 0/4] meson: Make syntax-check work on FreeBSD and macOS

2021-04-01 Thread Erik Skultety
a in ci/cirrus/ regenerated > accordingly before this can be pushed without introducing CI > failures. Reviewed-by: Erik Skultety

Re: [libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed

2021-04-01 Thread Erik Skultety
On Thu, Apr 01, 2021 at 11:10:05AM +0200, Erik Skultety wrote: > On Wed, Mar 24, 2021 at 07:37:57PM +0100, Andrea Bolognani wrote: > > Currently, if GNU grep is not installed on a FreeBSD system the > > configuration step will fail with > > > > Program gre

Re: [libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed

2021-04-01 Thread Erik Skultety
> > instead, which should do a better job helping the user figure > out that they need to install GNU grep from ports to proceed. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 0/2] qemu: wire up support for rotation rate for disks

2021-03-31 Thread Erik Skultety
On Wed, Mar 31, 2021 at 10:50:24AM +0100, Daniel P. Berrangé wrote: > By default QEMU doesn't report any rotation information to guests, so > guests assume rotational media. This lets the user specify an explicit > speed in RPM, or 1 for SSD. This may allow the user to achieve better > performance

Re: [libvirt PATCH v6 00/30] Add support for persistent mediated devices

2021-03-31 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:47:56AM -0500, Jonathon Jongsma wrote: > This patch series follows the previously-merged series which added support for > transient mediated devices. This series expands mdev support to include > persistent device definitions. Again, it relies on mdevctl as the backend. >

Re: [libvirt PATCH v6 15/30] nodedev: add function to generate mdevctl define command

2021-03-31 Thread Erik Skultety
igned-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 11/30] nodedev: add mdevctl devices to node device list

2021-03-30 Thread Erik Skultety
re to copy the extra information into the new > device definition. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 26/30] nodedev: add ability to specify UUID for new mdevs

2021-03-30 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:22AM -0500, Jonathon Jongsma wrote: > Use the new element in the mdev caps to define and start devices > with a specific UUID. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 19/30] nodedev: refactor tests to support mdev undefine

2021-03-30 Thread Erik Skultety
and will be introduced in a > following patch. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 16/30] api: add virNodeDeviceDefineXML()

2021-03-30 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:12AM -0500, Jonathon Jongsma wrote: > With mediated devices, we can now define persistent node devices that > can be started and stopped. In order to take advantage of this, we need > an API to define new node devices. > > Signed-off-by: Jonathon Jongsma > --- > inc

Re: [libvirt PATCH v6 20/30] api: add virNodeDeviceUndefine()

2021-03-30 Thread Erik Skultety
gt; +int > +virNodeDeviceUndefine(virNodeDevice *dev) For consistency reasons ^this should remain virNodeDevicePtr ... > > +virCommand* virCommand * I noticed this pattern repeating across the whole series, some of the occurrences I commented on (when I noticed), some of the

Re: [libvirt PATCH v6 16/30] api: add virNodeDeviceDefineXML()

2021-03-30 Thread Erik Skultety
ATE_DEVICE, > virt_type))) > +return NULL; > + > +if (virNodeDeviceDefineXMLEnsureACL(conn, def) < 0) > +return NULL; > + > +if (!nodeDeviceHasCapability(def, VIR_NODE_DEV_CAP_MDEV)) { > +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > + _("Unsupported device type")); > +return NULL; > +} > + > +if (!def->parent) { > +virReportError(VIR_ERR_XML_ERROR, "%s", > + _("cannot define a mediated device without a > parent")); > +return NULL; > +} > + > +if (virMdevctlDefine(def, &uuid, &errmsg) < 0) { > +virReportError(VIR_ERR_INTERNAL_ERROR, > + _("Unable to define mediated device: %s"), > + errmsg && errmsg[0] ? errmsg : "Unknown Error"); My comment from 1/30 would apply ^here too. Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 14/30] nodedev: Refresh mdev devices when changes are detected

2021-03-30 Thread Erik Skultety
(100, > scheduleMdevctlHandler, > + priv, NULL); > +return; > +} > + > +scheduleMdevctlHandler(-1, priv); > +} Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 13/30] nodedev: handle mdevs that disappear from mdevctl

2021-03-30 Thread Erik Skultety
nodedev driver list. */ > +static bool > +removeMissingPersistentMdevs(virNodeDeviceObj *obj, Since this handles a single device at a time --> removeMissingPersistentMdev Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 12/30] nodedev: add helper functions to remove node devices

2021-03-30 Thread Erik Skultety
from the > + * object list. > + */ > +void > +virNodeDeviceObjListForEachRemove(virNodeDeviceObjList *devs, > + virNodeDeviceObjListRemoveIter iter, > + void *opaque) > +{ > +struct virNodeDeviceObjListRemoveData data = { > +.iter = iter, > +.opaque = opaque > +}; > + > +virObjectRWLockWrite(devs); > +g_hash_table_foreach_remove(devs->objs, > +virNodeDeviceObjListRemoveCb, xyzListRemoveHelper... Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 28/30] nodedev: add docs about mdev attribute order

2021-03-30 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:24AM -0500, Jonathon Jongsma wrote: > Mention that mdev attribute order is significant. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 29/30] nodedev: factor out function to add mediated devices

2021-03-30 Thread Erik Skultety
ce/node_device_driver.c > @@ -1506,6 +1506,60 @@ removeMissingPersistentMdevs(virNodeDeviceObj *obj, > } If you move the function to the correct place as mentioned in 30/30: Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 30/30] nodedev: avoid delay when defining a new mdev

2021-03-30 Thread Erik Skultety
+ * device immediately it will wait at 5s before checking again. Since we > + * have already received the uuid from virMdevctlDefine(), we can simply > + * add the provisional device to the list and return it immediately and > + * avoid this long delay. */ > +if (nodeDeviceUpdateMediatedDevice(g_steal_pointer(&def)) < 0) > +return NULL; Let's just hope this workaround will not bite us in the back in the future. That said, I really didn't like the 5s delay :). After decreasing the diff of this patch: Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 10/30] nodedev: add DEFINED/UNDEFINED lifecycle events

2021-03-29 Thread Erik Skultety
still exists. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 09/30] nodedev: add persistence to virNodeDeviceObj

2021-03-29 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:05AM -0500, Jonathon Jongsma wrote: > Consistent with other objects (e.g. virDomainObj), add a field to > indicate whether the node device is persistent or transient. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 08/30] nodedev: add ability to list defined mdevs

2021-03-29 Thread Erik Skultety
virCommandSetOutputBuffer(cmd, output); Since we'll capture error output from all the other mdevctl commands, I think we should do it here as well, even though 99.9% of cases won't use it. The rest looks fine. Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 07/30] nodedev: add ability to parse mdevs from mdevctl

2021-03-29 Thread Erik Skultety
gt; } \ > while (0) ^This IMO deserves a trivial standalone patch. As for the rest of the code - per the discussion that happened in v4: Reviewed-by: Erik Skultety > > @@ -281,6 +328,9 @@ mymain(void) > #define DO_TEST_STOP(uuid) \ > DO_TEST_FULL("mdevctl

Re: [libvirt PATCH v6 06/30] nodedev: expose internal helper for naming devices

2021-03-29 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:02AM -0500, Jonathon Jongsma wrote: > Expose a helper function that can be used by udev and mdevctl to > generate device names for node devices. > > Signed-off-by: Jonathon Jongsma > Reviewed-by: Erik Skultety > --- > src/node_device/node

Re: [libvirt PATCH v6 05/30] nodedev: fix docs for virConnectListAllNodeDevices()

2021-03-29 Thread Erik Skultety
ce > that does not apply to this API. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v6 04/30] nodedev: Add ability to filter by active state

2021-03-29 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:48:00AM -0500, Jonathon Jongsma wrote: > Add two flag values for virConnectListAllNodeDevices() so that we can > list only node devices that are active or inactive. > > Signed-off-by: Jonathon Jongsma > Reviewed-by: Erik Skultety > --- > in

Re: [libvirt PATCH v6 01/30] nodedev: capture and report stderror from mdevctl

2021-03-29 Thread Erik Skultety
ErrorLogFilter just before logging the error to perform the final log priority change which demotes every error message generated internally with an error code of VIR_ERROR_NO_XYZ (see [1]). Therefore we'll have to fix the two callers mentioned above to report an internal error instead, but we

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-03-28 Thread Erik Skultety
On Fri, Mar 26, 2021 at 05:11:04PM +0100, Andrea Bolognani wrote: > On Fri, 2021-03-26 at 17:00 +0100, Erik Skultety wrote: > > On Fri, Mar 26, 2021 at 11:35:02AM +0100, Andrea Bolognani wrote: > > > We should always pass --werror and display the contents of the > > >

Re: [libvirt PATCH 1/2] ci: Don't use --prefix with meson for Cirrus CI builds

2021-03-26 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:35:01AM +0100, Andrea Bolognani wrote: > It's no longer used. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-03-26 Thread Erik Skultety
On Fri, Mar 26, 2021 at 11:35:02AM +0100, Andrea Bolognani wrote: > We should always pass --werror and display the contents of the > log file in case of failure. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v5 00/30] Add support for persistent mediated devices

2021-03-26 Thread Erik Skultety
On Fri, Mar 26, 2021 at 09:37:34AM -0500, Jonathon Jongsma wrote: > On Fri, 26 Mar 2021 07:27:46 +0100 > Erik Skultety wrote: > > > On Thu, Mar 25, 2021 at 11:49:49AM -0500, Jonathon Jongsma wrote: > > > Just a friendly ping ;) > > > > I'm sorry I

Re: [libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed

2021-03-26 Thread Erik Skultety
On Wed, Mar 24, 2021 at 07:37:57PM +0100, Andrea Bolognani wrote: > Currently, if GNU grep is not installed on a FreeBSD system the > configuration step will fail with > > Program grep found: YES (/usr/bin/grep) > Program /usr/local/bin/grep found: NO > > ERROR: Program '/usr/local/bin/grep

Re: [libvirt PATCH v2] ci: Refresh information

2021-03-25 Thread Erik Skultety
r than 0.54 is requested when installing > it from PyPI; > > * GNU sed and GNU grep are installed explicitly everywhere. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v5 00/30] Add support for persistent mediated devices

2021-03-25 Thread Erik Skultety
On Thu, Mar 25, 2021 at 11:49:49AM -0500, Jonathon Jongsma wrote: > Just a friendly ping ;) I'm sorry I've been neglecting this for the past 3 weeks or so, I'll dive right into it starting Monday next week, we're entering freeze today anyway. Would you mind resending a rebased version? There were

Re: [PATCH 0/2] lib: Use g_steal_pointer() more

2021-03-24 Thread Erik Skultety
On Wed, Mar 24, 2021 at 11:27:05AM +0100, Michal Privoznik wrote: > *** BLURB HERE *** ...BLURB THERE... Reviewed-by: Erik Skultety ...BLURB EVERYWHERE...

Re: [libvirt PATCH] ci: Refresh information

2021-03-24 Thread Erik Skultety
sed instead of 0.54 when installing from > PyPI. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

[PATCH] Virtuozzo URL has been changed (RESEND FROM GITLAB)

2021-03-24 Thread Erik Skultety
From: Yaroslav Kargin Signed-off-by: Yaroslav Kargin --- This patch was merged in gitlab, resending it to the list. docs/drvvirtuozzo.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drvvirtuozzo.html.in b/docs/drvvirtuozzo.html.in index 8813d00ad8..e47f72bad1

Re: [libvirt PATCH 3/3] syntax-check: Run flake8 on all Python scripts

2021-03-22 Thread Erik Skultety
On Mon, Mar 22, 2021 at 10:29:32AM +0100, Andrea Bolognani wrote: > On Mon, 2021-03-22 at 07:50 +0100, Erik Skultety wrote: > > On Fri, Mar 19, 2021 at 06:39:31PM +0100, Andrea Bolognani wrote: > > > sc_flake8: > > > @if [ -n "$(FLAKE8)" ]; then \ >

Re: [libvirt PATCH] qemu: Update asyncOwnerAPI when entering async job phase

2021-03-22 Thread Erik Skultety
t; currently handling the job. Let's also update asyncOwnerAPI to make it > more obvious which is the current (or the most recent) API involved in > the job. > > Signed-off-by: Jiri Denemark > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 0/2] qemu: Use g_auto* in a few more places

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 11:28:36PM +0100, Jiri Denemark wrote: > I'll be touching these functions soon, let's modernize them first. Reviewed-by: Erik Skultety

Re: [libvirt PATCH] qemu: Drop redundant checks for qemuCaps before virQEMUCapsGet

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 11:30:24PM +0100, Jiri Denemark wrote: > virQEMUCapsGet checks for qemuCaps itself, no need to do it explicitly. > > Signed-off-by: Jiri Denemark > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH] ci: Drop prefix from Dockerfiles

2021-03-21 Thread Erik Skultety
hose are generated the very same way. > > Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety

Re: [libvirt PATCH 2/3] tests: Fix flake8 errors in virsh-auth

2021-03-21 Thread Erik Skultety
On Fri, Mar 19, 2021 at 06:39:30PM +0100, Andrea Bolognani wrote: > Specifically > > E111 indentation is not a multiple of four > > This commit is better viewed with 'git show -w'. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 1/3] gitignore: Ignore __pycache__ directory

2021-03-21 Thread Erik Skultety
i > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 3/3] syntax-check: Run flake8 on all Python scripts

2021-03-21 Thread Erik Skultety
On Fri, Mar 19, 2021 at 06:39:31PM +0100, Andrea Bolognani wrote: > Currenty we only check files that end in .py, but we have at > least a couple of scripts that don't have that suffix and we > nonetheless want to keep compliant with the code style. > > Extend the sc_flake8 syntax-check rule so th

Re: [libvirt PATCH v4 5/6] ci: util: Add a registry checker for stale images

2021-03-19 Thread Erik Skultety
On Thu, Mar 18, 2021 at 05:32:14PM +0100, Andrea Bolognani wrote: > On Thu, 2021-03-18 at 17:11 +0100, Erik Skultety wrote: > > +msg = textwrap.dedent(f""" > > +The following images are stale and can be

Re: [libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-19 Thread Erik Skultety
On Thu, Mar 18, 2021 at 12:09:19PM +0100, Andrea Bolognani wrote: > On Thu, 2021-03-18 at 09:09 +0100, Erik Skultety wrote: > > As documented at [1], the common practice wrt to private > > s/wrt to/with respect to/ > > > def parse(self): > >

[libvirt PATCH v4 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
em available for the user to consume and run a build in them. Naturally, the build will most likely fail leaving the user confused. Signed-off-by: Erik Skultety --- ci/helper | 46 +- ci/util.py | 41 + 2 files ch

[libvirt PATCH v4 6/6] ci: helper: Apply Python naming practice to private methods/attributes

2021-03-18 Thread Erik Skultety
As documented at [1], the common practice with respect to private attributes/methods naming is to prefix them with an underscore. [1] https://docs.python.org/3/tutorial/classes.html#private-variables Signed-off-by: Erik Skultety --- ci/helper | 122

[libvirt PATCH v4 2/6] ci: helper: Introduce --quiet

2021-03-18 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index 8f34f4b59d

[libvirt PATCH v4 4/6] ci: helper: Rewrite image listing to Python

2021-03-18 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/Makefile | 12 --

[libvirt PATCH v4 3/6] ci: Introduce a util module

2021-03-18 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/util.py | 40 1 file changed, 40

[libvirt PATCH v4 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-18 Thread Erik Skultety
: https://listman.redhat.com/archives/libvir-list/2021-March/msg00789.html v3: https://listman.redhat.com/archives/libvir-list/2021-March/msg00892.html Erik Skultety (6): ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter ci: helper: Introduce --quiet ci: Introduce a util module

[libvirt PATCH v4 1/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-18 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper

Re: [libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-18 Thread Erik Skultety
On Thu, Mar 18, 2021 at 12:09:19PM +0100, Andrea Bolognani wrote: > On Thu, 2021-03-18 at 09:09 +0100, Erik Skultety wrote: > > As documented at [1], the common practice wrt to private > > s/wrt to/with respect to/ > > > def parse(self): > >

Re: [libvirt PATCH v3 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
... > > +def get_registry_stale_images(registry_uri: str, > > + supported_distros: List[str]) -> Dict[str, > > int]: > > +""" > > +Check the GitLab image registry for images that we no longer support > > and > > +which should be deleted. > > + > > +:p

Re: [libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
... > Another thing I'm not a fan of is having the message start at column > zero instead of being aligned along with the rest of the code... > textwrap.dedent() could help here, although it'd be a little annoying > to use because we want the image details to be indented and we can't > know the co

[libvirt PATCH v3 1/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-18 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper

[libvirt PATCH v3 4/6] ci: helper: Rewrite image listing to Python

2021-03-18 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/Makefile | 12 --

[libvirt PATCH v3 3/6] ci: Introduce a util module

2021-03-18 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/util.py | 40 1 file changed, 40

[libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-18 Thread Erik Skultety
As documented at [1], the common practice wrt to private attributes/methods naming is to prefix them with an underscore. [1] https://docs.python.org/3/tutorial/classes.html#private-variables Signed-off-by: Erik Skultety --- ci/helper | 68

[libvirt PATCH v3 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-18 Thread Erik Skultety
https://gitlab.com/api/v4/projects/libvirt%2Flibvirt/registry/repos= itories/$image_id \ done You can generate a personal access token here: https://gitlab.com/-/profile/personal_access_tokens Erik Skultety (6): ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter ci: he

[libvirt PATCH v3 2/6] ci: helper: Introduce --quiet

2021-03-18 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index 8f34f4b59d

[libvirt PATCH v3 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
em available for the user to consume and run a build in them. Naturally, the build will most likely fail leaving the user confused. Signed-off-by: Erik Skultety --- ci/helper | 45 - ci/util.py | 52

Re: [libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 06:11:32PM +0100, Andrea Bolognani wrote: > On Wed, 2021-03-17 at 18:05 +0100, Erik Skultety wrote: > > On Wed, Mar 17, 2021 at 05:06:33PM +0100, Andrea Bolognani wrote: > > > I don't know how to express that in terms of Python types > > >

Re: [libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 04:57:01PM +0100, Andrea Bolognani wrote: > On Tue, 2021-03-16 at 18:33 +0100, Erik Skultety wrote: > > +++ b/ci/helper > > +def _list_stale_images(self): > > So far we have not used "_" as the prefix for any method name. Do we > want

Re: [libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 05:06:33PM +0100, Andrea Bolognani wrote: > On Tue, 2021-03-16 at 18:32 +0100, Erik Skultety wrote: > > +++ b/ci/util.py > > +def get_registry_images(uri: str) -> Dict[str, str]: > > On closer inspection, the return type is not correct: we return

Re: [libvirt PATCH v2 2/3] docs: html.in: Convert auth to rst

2021-03-17 Thread Erik Skultety
On Mon, Mar 15, 2021 at 06:39:45PM +0100, Erik Skultety wrote: > There was one external reference to this page's section which was fixed > manually. > > Signed-off-by: Erik Skultety > --- ... > index fece9df80e..bd85c2e36e 100644 > --- a/docs/kbase/locking-sanlock.rst

Re: [libvirt PATCH v2 3/6] ci: helper: Introduce --quiet

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 11:54:40AM +0100, Andrea Bolognani wrote: > On Tue, 2021-03-16 at 18:32 +0100, Erik Skultety wrote: > > +++ b/ci/helper > > @@ -68,6 +68,12 @@ class Parser: > > > > # Main parser > > self

Re: [libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 12:02:31PM +0100, Andrea Bolognani wrote: > On Tue, 2021-03-16 at 18:32 +0100, Erik Skultety wrote: > > +import urllib.request as urllibrequest > > +import urllib.parse as urllibparse > > The aliasing doesn't look like it serves a real purpose

Re: [libvirt PATCH v2 2/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-17 Thread Erik Skultety
On Wed, Mar 17, 2021 at 11:52:22AM +0100, Andrea Bolognani wrote: > On Tue, 2021-03-16 at 18:32 +0100, Erik Skultety wrote: > > This help formatter class reports the defaults we use for options > > taking an argument. > > > > Signed-off-by: Erik Skultety > > --

[libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

2021-03-16 Thread Erik Skultety
em available for the user to consume and run a build in them. Naturally, the build will most likely fail leaving the user confused. Signed-off-by: Erik Skultety --- ci/helper | 54 +- ci/util.py | 13 + 2 files changed, 66 inser

[libvirt PATCH v2 3/6] ci: helper: Introduce --quiet

2021-03-16 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index 8f34f4b59d..abac686d22 100755 --- a/ci/helper

[libvirt PATCH v2 5/6] ci: helper: Rewrite image listing to Python

2021-03-16 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety --- ci/Makefile | 12 +--- ci/helper

[libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-16 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety --- ci/util.py | 39 +++ 1 file changed, 39 insertions(+) create mode

[libvirt PATCH v2 1/6] ci: Makefile: Specify a help target to replace ci-help

2021-03-16 Thread Erik Skultety
efore, add a 'help' target and replace the old 'ci-help' target with it. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/Makefile b/ci/Makefile index 72f5bda942..f83ecac1e5 10

[libvirt PATCH v2 2/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-16 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper +++ b/ci/helper @@ -79,6 +79,7

[libvirt PATCH v2 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-16 Thread Erik Skultety
/v4/projects/libvirt%2Flibvirt/registry/repos= itories/$image_id \ done Erik Skultety (6): ci: Makefile: Specify a help target to replace ci-help ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter ci: helper: Introduce --quiet ci: Introduce a util module ci: helper: Rewr

Re: [PATCH] docs/compiling: Add note on how to check minimum meson version

2021-03-16 Thread Erik Skultety
file to RST was to close the issue..and then I forgot about it. Reviewed-by: Erik Skultety

[libvirt PATCH v2 3/3] docs: kbase: Fix a broken formatdomain reference in locking-sanlock

2021-03-15 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/kbase/locking-sanlock.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kbase/locking-sanlock.rst b/docs/kbase/locking-sanlock.rst index bd85c2e36e..24895b42f4 100644 --- a/docs/kbase/locking-sanlock.rst +++ b/docs/kbase/locking

[libvirt PATCH v2 1/3] docs: html.in: Drop the architecture page

2021-03-15 Thread Erik Skultety
The page isn't linked from anywhere and the contents is dated. Images related to the page are also dropped. Signed-off-by: Erik Skultety --- docs/architecture.gif | Bin 5571 -> 0 bytes docs/architecture.html.in | 82 - docs/architecture.svg

<    1   2   3   4   5   6   7   8   9   10   >