* [PATCH v2] classes: rootfs-postcommands: add skip option to overlayfs_qa_check
@ 2022-04-29 8:17 Claudius Heine
2022-05-02 19:09 ` [OE-core] " Luca Ceresoli
0 siblings, 1 reply; 3+ messages in thread
From: Claudius Heine @ 2022-04-29 8:17 UTC (permalink / raw)
To: openembedded-core
Cc: Stefan Herbrechtsmeier, Vyacheslav Yurkov, Claudius Heine
The overlayfs_qa_check checks if the current root file system has a
mount configured for each overlayfs, when the overlayfs class is used.
However there are certain instances where this mount point is created at
runtime and not static in a fstab entry or systemd mount unit.
One such case would be if overlayfs-etc is used, where the device is
mounted in the preinit script and not via a mount unit or fstab entry.
However there are other possibilities for this as well, like startup
scripts that support a dynamic partition layout. For instance when
systemd-repart is used.
This adds the `OVERLAYFS_QA_SKIP` variable, which allows to define QA
skips via its flags. In principle it supports multiple QA skip flags
separated by whitespace, but only one (`mount-configured`) is
implemented here. To skip this QA check simply add `mount-configured` to
the flag of `OVERLAYFS_QA_SKIP` with the same name. For instance if a
overlayfs is configured as:
OVERLAYFS_MOUNT_POINT[data] = "/data"
Skipping this QA check can be done by setting:
OVERLAYFS_QA_SKIP[data] = "mount-configured"
Signed-off-by: Claudius Heine <ch@denx.de>
---
Sorry, I was a bit to quick when sending the last patch and forgot to
amend a typo fix before sending.
Difference between v2:
- `getVarFag` -> `getVarFlag`
---
meta/classes/rootfs-postcommands.bbclass | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 7b92df69c5..9b6824043c 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -398,6 +398,10 @@ python overlayfs_qa_check() {
allUnitExist = True;
for mountPoint in overlayMountPoints:
+ qaSkip = (d.getVarFlag("OVERLAYFS_QA_SKIP", mountPoint) or "").split()
+ if "mount-configured" in qaSkip:
+ continue
+
mountPath = d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint)
if mountPath in fstabDevices:
continue
@@ -407,8 +411,10 @@ python overlayfs_qa_check() {
for dirpath in searchpaths):
continue
- bb.warn('Mount path %s not found in fstat and unit %s not found '
- 'in systemd unit directories' % (mountPath, mountUnit))
+ bb.warn(f'Mount path {mountPath} not found in fstab and unit '
+ f'{mountUnit} not found in systemd unit directories.')
+ bb.warn(f'Skip this check by setting OVERLAYFS_QA_SKIP[{mountPoint}] = '
+ '"mount-configured"')
allUnitExist = False;
if not allUnitExist:
--
2.33.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH v2] classes: rootfs-postcommands: add skip option to overlayfs_qa_check
2022-04-29 8:17 [PATCH v2] classes: rootfs-postcommands: add skip option to overlayfs_qa_check Claudius Heine
@ 2022-05-02 19:09 ` Luca Ceresoli
2022-05-03 7:54 ` Claudius Heine
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2022-05-02 19:09 UTC (permalink / raw)
To: Claudius Heine
Cc: openembedded-core, Stefan Herbrechtsmeier, Vyacheslav Yurkov
Hi Claudius,
Il giorno Fri, 29 Apr 2022 10:17:33 +0200
"Claudius Heine" <ch@denx.de> ha scritto:
> The overlayfs_qa_check checks if the current root file system has a
> mount configured for each overlayfs, when the overlayfs class is used.
>
> However there are certain instances where this mount point is created
> at runtime and not static in a fstab entry or systemd mount unit.
>
> One such case would be if overlayfs-etc is used, where the device is
> mounted in the preinit script and not via a mount unit or fstab entry.
>
> However there are other possibilities for this as well, like startup
> scripts that support a dynamic partition layout. For instance when
> systemd-repart is used.
>
> This adds the `OVERLAYFS_QA_SKIP` variable, which allows to define QA
> skips via its flags. In principle it supports multiple QA skip flags
> separated by whitespace, but only one (`mount-configured`) is
> implemented here. To skip this QA check simply add `mount-configured`
> to the flag of `OVERLAYFS_QA_SKIP` with the same name. For instance
> if a overlayfs is configured as:
>
> OVERLAYFS_MOUNT_POINT[data] = "/data"
>
> Skipping this QA check can be done by setting:
>
> OVERLAYFS_QA_SKIP[data] = "mount-configured"
>
> Signed-off-by: Claudius Heine <ch@denx.de>
Failures appeared on the autobuilders with your patch applied:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3530/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3530/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/3470/steps/14/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3521/steps/15/logs/stdio
Best regards,
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH v2] classes: rootfs-postcommands: add skip option to overlayfs_qa_check
2022-05-02 19:09 ` [OE-core] " Luca Ceresoli
@ 2022-05-03 7:54 ` Claudius Heine
0 siblings, 0 replies; 3+ messages in thread
From: Claudius Heine @ 2022-05-03 7:54 UTC (permalink / raw)
To: Luca Ceresoli
Cc: openembedded-core, Stefan Herbrechtsmeier, Vyacheslav Yurkov
On 2022-05-02 21:09, Luca Ceresoli wrote:
> Hi Claudius,
>
Hi Luca,
> Il giorno Fri, 29 Apr 2022 10:17:33 +0200
> "Claudius Heine" <ch@denx.de> ha scritto:
>
>> The overlayfs_qa_check checks if the current root file system has a
>> mount configured for each overlayfs, when the overlayfs class is used.
>>
>> However there are certain instances where this mount point is created
>> at runtime and not static in a fstab entry or systemd mount unit.
>>
>> One such case would be if overlayfs-etc is used, where the device is
>> mounted in the preinit script and not via a mount unit or fstab entry.
>>
>> However there are other possibilities for this as well, like startup
>> scripts that support a dynamic partition layout. For instance when
>> systemd-repart is used.
>>
>> This adds the `OVERLAYFS_QA_SKIP` variable, which allows to define QA
>> skips via its flags. In principle it supports multiple QA skip flags
>> separated by whitespace, but only one (`mount-configured`) is
>> implemented here. To skip this QA check simply add `mount-configured`
>> to the flag of `OVERLAYFS_QA_SKIP` with the same name. For instance
>> if a overlayfs is configured as:
>>
>> OVERLAYFS_MOUNT_POINT[data] = "/data"
>>
>> Skipping this QA check can be done by setting:
>>
>> OVERLAYFS_QA_SKIP[data] = "mount-configured"
>>
>> Signed-off-by: Claudius Heine <ch@denx.de>
>
> Failures appeared on the autobuilders with your patch applied:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3530/steps/15/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3530/steps/15/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/3470/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3521/steps/15/logs/stdio
Thanks! It seems that failed because I also fixed a typo in the warning
message ('fstat -> fstab').
I will change that in v3 and also add a testcase for the
OVERLAYFS_QA_SKIP functionality.
regards,
Claudius
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-03 7:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 8:17 [PATCH v2] classes: rootfs-postcommands: add skip option to overlayfs_qa_check Claudius Heine
2022-05-02 19:09 ` [OE-core] " Luca Ceresoli
2022-05-03 7:54 ` Claudius Heine
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.