* [PATCH v1 0/1] dts: fix hugepage mounting
@ 2024-08-12 15:04 jspewock
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: jspewock @ 2024-08-12 15:04 UTC (permalink / raw)
To: probb, Honnappa.Nagarahalli, npratte, juraj.linkes,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
Luca.Vizzarro, alex.chapman
Cc: dev, Jeremy Spewock
From: Jeremy Spewock <jspewock@iol.unh.edu>
Currently in the DTS framework there are some commands used for
remounting hugepages that require super-user privileges but do not use
them, causing them to throw errors whenever they are run as a non-root
user. This patches fixes these problems by simply adding a flag that
enables admin privileges for the commands that are missing them.
Jeremy Spewock (1):
dts: add admin privileges to hugepage mounting
dts/framework/testbed_model/linux_session.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 1/1] dts: add admin privileges to hugepage mounting
2024-08-12 15:04 [PATCH v1 0/1] dts: fix hugepage mounting jspewock
@ 2024-08-12 15:04 ` jspewock
2024-08-12 15:17 ` Nicholas Pratte
` (2 more replies)
2024-09-09 8:23 ` [PATCH v1 0/1] dts: fix " Juraj Linkeš
2024-09-09 15:52 ` Juraj Linkeš
2 siblings, 3 replies; 7+ messages in thread
From: jspewock @ 2024-08-12 15:04 UTC (permalink / raw)
To: probb, Honnappa.Nagarahalli, npratte, juraj.linkes,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
Luca.Vizzarro, alex.chapman
Cc: dev, Jeremy Spewock
From: Jeremy Spewock <jspewock@iol.unh.edu>
There were two different commands in the hugepage mounting process that
were not using super-user privileges; one for unmounting hugepages and
another for re-mounting them. This patch adds the flag that enables
enhanced permissions for both of these actions.
Bugzilla ID: 1439
Fixes: b8bdc4c58f57 ("dts: replace pexpect with fabric")
Cc: juraj.linkes@pantheon.tech
Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
---
dts/framework/testbed_model/linux_session.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
index 99abc21353..544a665b83 100644
--- a/dts/framework/testbed_model/linux_session.py
+++ b/dts/framework/testbed_model/linux_session.py
@@ -123,12 +123,12 @@ def _get_numa_nodes(self) -> list[int]:
def _mount_huge_pages(self) -> None:
self._logger.info("Re-mounting Hugepages.")
hugapge_fs_cmd = "awk '/hugetlbfs/ { print $2 }' /proc/mounts"
- self.send_command(f"umount $({hugapge_fs_cmd})")
+ self.send_command(f"umount $({hugapge_fs_cmd})", privileged=True)
result = self.send_command(hugapge_fs_cmd)
if result.stdout == "":
remote_mount_path = "/mnt/huge"
- self.send_command(f"mkdir -p {remote_mount_path}")
- self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}")
+ self.send_command(f"mkdir -p {remote_mount_path}", privileged=True)
+ self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}", privileged=True)
def _supports_numa(self) -> bool:
# the system supports numa if self._numa_nodes is non-empty and there are more
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/1] dts: add admin privileges to hugepage mounting
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
@ 2024-08-12 15:17 ` Nicholas Pratte
2024-09-09 15:44 ` Luca Vizzarro
2024-09-09 15:48 ` Juraj Linkeš
2 siblings, 0 replies; 7+ messages in thread
From: Nicholas Pratte @ 2024-08-12 15:17 UTC (permalink / raw)
To: jspewock
Cc: probb, Honnappa.Nagarahalli, juraj.linkes, wathsala.vithanage,
yoan.picchi, thomas, paul.szczepanek, Luca.Vizzarro,
alex.chapman, dev
Reviewed-by: Nicholas Pratte <npratte@iol.unh.edu>
On Mon, Aug 12, 2024 at 11:04 AM <jspewock@iol.unh.edu> wrote:
>
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> There were two different commands in the hugepage mounting process that
> were not using super-user privileges; one for unmounting hugepages and
> another for re-mounting them. This patch adds the flag that enables
> enhanced permissions for both of these actions.
>
> Bugzilla ID: 1439
> Fixes: b8bdc4c58f57 ("dts: replace pexpect with fabric")
> Cc: juraj.linkes@pantheon.tech
>
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> ---
> dts/framework/testbed_model/linux_session.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
> index 99abc21353..544a665b83 100644
> --- a/dts/framework/testbed_model/linux_session.py
> +++ b/dts/framework/testbed_model/linux_session.py
> @@ -123,12 +123,12 @@ def _get_numa_nodes(self) -> list[int]:
> def _mount_huge_pages(self) -> None:
> self._logger.info("Re-mounting Hugepages.")
> hugapge_fs_cmd = "awk '/hugetlbfs/ { print $2 }' /proc/mounts"
> - self.send_command(f"umount $({hugapge_fs_cmd})")
> + self.send_command(f"umount $({hugapge_fs_cmd})", privileged=True)
> result = self.send_command(hugapge_fs_cmd)
> if result.stdout == "":
> remote_mount_path = "/mnt/huge"
> - self.send_command(f"mkdir -p {remote_mount_path}")
> - self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}")
> + self.send_command(f"mkdir -p {remote_mount_path}", privileged=True)
> + self.send_command(f"mount -t hugetlbfs nodev {remote_mount_path}", privileged=True)
>
> def _supports_numa(self) -> bool:
> # the system supports numa if self._numa_nodes is non-empty and there are more
> --
> 2.45.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/1] dts: add admin privileges to hugepage mounting
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
2024-08-12 15:17 ` Nicholas Pratte
@ 2024-09-09 15:44 ` Luca Vizzarro
2024-09-09 15:48 ` Juraj Linkeš
2 siblings, 0 replies; 7+ messages in thread
From: Luca Vizzarro @ 2024-09-09 15:44 UTC (permalink / raw)
To: jspewock, probb, Honnappa.Nagarahalli, npratte, juraj.linkes,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
alex.chapman
Cc: dev
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/1] dts: add admin privileges to hugepage mounting
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
2024-08-12 15:17 ` Nicholas Pratte
2024-09-09 15:44 ` Luca Vizzarro
@ 2024-09-09 15:48 ` Juraj Linkeš
2 siblings, 0 replies; 7+ messages in thread
From: Juraj Linkeš @ 2024-09-09 15:48 UTC (permalink / raw)
To: jspewock, probb, Honnappa.Nagarahalli, npratte,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
Luca.Vizzarro, alex.chapman
Cc: dev
On 12. 8. 2024 17:04, jspewock@iol.unh.edu wrote:
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> There were two different commands in the hugepage mounting process that
> were not using super-user privileges; one for unmounting hugepages and
> another for re-mounting them. This patch adds the flag that enables
> enhanced permissions for both of these actions.
>
> Bugzilla ID: 1439
> Fixes: b8bdc4c58f57 ("dts: replace pexpect with fabric")
> Cc: juraj.linkes@pantheon.tech
>
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 0/1] dts: fix hugepage mounting
2024-08-12 15:04 [PATCH v1 0/1] dts: fix hugepage mounting jspewock
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
@ 2024-09-09 8:23 ` Juraj Linkeš
2024-09-09 15:52 ` Juraj Linkeš
2 siblings, 0 replies; 7+ messages in thread
From: Juraj Linkeš @ 2024-09-09 8:23 UTC (permalink / raw)
To: jspewock, probb, Honnappa.Nagarahalli, npratte,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
Luca.Vizzarro, alex.chapman
Cc: dev
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
On 12. 8. 2024 17:04, jspewock@iol.unh.edu wrote:
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> Currently in the DTS framework there are some commands used for
> remounting hugepages that require super-user privileges but do not use
> them, causing them to throw errors whenever they are run as a non-root
> user. This patches fixes these problems by simply adding a flag that
> enables admin privileges for the commands that are missing them.
>
> Jeremy Spewock (1):
> dts: add admin privileges to hugepage mounting
>
> dts/framework/testbed_model/linux_session.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 0/1] dts: fix hugepage mounting
2024-08-12 15:04 [PATCH v1 0/1] dts: fix hugepage mounting jspewock
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
2024-09-09 8:23 ` [PATCH v1 0/1] dts: fix " Juraj Linkeš
@ 2024-09-09 15:52 ` Juraj Linkeš
2 siblings, 0 replies; 7+ messages in thread
From: Juraj Linkeš @ 2024-09-09 15:52 UTC (permalink / raw)
To: jspewock, probb, Honnappa.Nagarahalli, npratte,
wathsala.vithanage, yoan.picchi, thomas, paul.szczepanek,
Luca.Vizzarro, alex.chapman
Cc: dev
Applied to next-dts, thanks.
On 12. 8. 2024 17:04, jspewock@iol.unh.edu wrote:
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> Currently in the DTS framework there are some commands used for
> remounting hugepages that require super-user privileges but do not use
> them, causing them to throw errors whenever they are run as a non-root
> user. This patches fixes these problems by simply adding a flag that
> enables admin privileges for the commands that are missing them.
>
> Jeremy Spewock (1):
> dts: add admin privileges to hugepage mounting
>
> dts/framework/testbed_model/linux_session.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-09 15:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-12 15:04 [PATCH v1 0/1] dts: fix hugepage mounting jspewock
2024-08-12 15:04 ` [PATCH v1 1/1] dts: add admin privileges to " jspewock
2024-08-12 15:17 ` Nicholas Pratte
2024-09-09 15:44 ` Luca Vizzarro
2024-09-09 15:48 ` Juraj Linkeš
2024-09-09 8:23 ` [PATCH v1 0/1] dts: fix " Juraj Linkeš
2024-09-09 15:52 ` Juraj Linkeš
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).