diff mbox series

[RESEND,04/12] Makefile: Add virsh and libvirtd to minimum dependencies

Message ID 20250113-jag-bringup_fixes-v1-4-fb28030b1f26@kernel.org (mailing list archive)
State New
Headers show
Series kdevops: Various fixes | expand

Commit Message

Joel Granados Jan. 13, 2025, 11:53 a.m. UTC
Running scripts like bring up depend on 'virsh' being available.

Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
 Makefile.min_deps | 2 ++
 1 file changed, 2 insertions(+)

Comments

Daniel Gomez Jan. 13, 2025, 12:23 p.m. UTC | #1
On Mon, Jan 13, 2025 at 12:53:02PM +0100, Joel Granados wrote:
> Running scripts like bring up depend on 'virsh' being available.

I think these tools are required when CONFIG_KDEVOPS_FIRST_RUN is not
enabled and you run 'make'. 'make bringup' dependencies should have been
solved by 'make', so virsh and libvirtd packages should be provided in
one of the playbooks that are run there.

Luis, commit 0111187b ("Makefile.min_deps: ensure you have virt-builder
when using guestfs") adds virt-builder to the min deps list, can you
clarify why these deps cannot be solved in Ansible when running 'make'?

Daniel

> 
> Signed-off-by: Joel Granados <joel.granados@kernel.org>
> ---
>  Makefile.min_deps | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile.min_deps b/Makefile.min_deps
> index a1cb99a..d1251b4 100644
> --- a/Makefile.min_deps
> +++ b/Makefile.min_deps
> @@ -13,6 +13,8 @@ BINARY_DEPS += ansible-playbook
>  ifneq (y,$(CONFIG_KDEVOPS_FIRST_RUN))
>  ifeq (y,$(CONFIG_GUESTFS))
>  BINARY_DEPS += virt-builder
> +BINARY_DEPS += virsh
> +BINARY_DEPS += libvirtd
>  endif
>  endif
>  
> 
> -- 
> 2.44.2
> 
>
Joel Granados Jan. 14, 2025, 9:47 a.m. UTC | #2
On Mon, Jan 13, 2025 at 01:23:32PM +0100, Daniel Gomez wrote:
> On Mon, Jan 13, 2025 at 12:53:02PM +0100, Joel Granados wrote:
> > Running scripts like bring up depend on 'virsh' being available.
> 
> I think these tools are required when CONFIG_KDEVOPS_FIRST_RUN is not
> enabled and you run 'make'. 'make bringup' dependencies should have been
> solved by 'make', so virsh and libvirtd packages should be provided in
> one of the playbooks that are run there.
I put it where virt-builder was, But I can also put it in a playbook. Is
there already a debian specific playbook that installs all the deps when
CONFIG_KDEVOPS_FILRS_RUN is not enabled?

> 
> Luis, commit 0111187b ("Makefile.min_deps: ensure you have virt-builder
> when using guestfs") adds virt-builder to the min deps list, can you
> clarify why these deps cannot be solved in Ansible when running 'make'?
> 
> Daniel
> 
> > 
> > Signed-off-by: Joel Granados <joel.granados@kernel.org>
> > ---
> >  Makefile.min_deps | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Makefile.min_deps b/Makefile.min_deps
> > index a1cb99a..d1251b4 100644
> > --- a/Makefile.min_deps
> > +++ b/Makefile.min_deps
> > @@ -13,6 +13,8 @@ BINARY_DEPS += ansible-playbook
> >  ifneq (y,$(CONFIG_KDEVOPS_FIRST_RUN))
> >  ifeq (y,$(CONFIG_GUESTFS))
> >  BINARY_DEPS += virt-builder
> > +BINARY_DEPS += virsh
> > +BINARY_DEPS += libvirtd
> >  endif
> >  endif
> >  
> > 
> > -- 
> > 2.44.2
> > 
> >
Daniel Gomez Jan. 20, 2025, 2:18 p.m. UTC | #3
On Tue, Jan 14, 2025 at 10:47:35AM +0100, Joel Granados wrote:
> On Mon, Jan 13, 2025 at 01:23:32PM +0100, Daniel Gomez wrote:
> > On Mon, Jan 13, 2025 at 12:53:02PM +0100, Joel Granados wrote:
> > > Running scripts like bring up depend on 'virsh' being available.
> > 
> > I think these tools are required when CONFIG_KDEVOPS_FIRST_RUN is not
> > enabled and you run 'make'. 'make bringup' dependencies should have been
> > solved by 'make', so virsh and libvirtd packages should be provided in
> > one of the playbooks that are run there.
> I put it where virt-builder was, But I can also put it in a playbook. Is
> there already a debian specific playbook that installs all the deps when
> CONFIG_KDEVOPS_FILRS_RUN is not enabled?

Yes, I think the place is the playbook where it's needed. But to verify
virtualization is possible in the user's system, FIRST_RUN is the place
as it's described in docs/kdevops-first-run.md.

So, let's not extend min_deps for now as I think it needs some rework in
an Ansible playbook instead. We can probably detect !FIRST_RUN and run
some Ansible playbook to install virsh and libvirtd. But I guess that
won't be sufficient as we would not verify virtualization is possible.

I'm planning to set up a new Debian Testing box this week. I'll be
interested in verifying this condition.

> 
> > 
> > Luis, commit 0111187b ("Makefile.min_deps: ensure you have virt-builder
> > when using guestfs") adds virt-builder to the min deps list, can you
> > clarify why these deps cannot be solved in Ansible when running 'make'?
> > 
> > Daniel
> > 
> > > 
> > > Signed-off-by: Joel Granados <joel.granados@kernel.org>
> > > ---
> > >  Makefile.min_deps | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/Makefile.min_deps b/Makefile.min_deps
> > > index a1cb99a..d1251b4 100644
> > > --- a/Makefile.min_deps
> > > +++ b/Makefile.min_deps
> > > @@ -13,6 +13,8 @@ BINARY_DEPS += ansible-playbook
> > >  ifneq (y,$(CONFIG_KDEVOPS_FIRST_RUN))
> > >  ifeq (y,$(CONFIG_GUESTFS))
> > >  BINARY_DEPS += virt-builder
> > > +BINARY_DEPS += virsh
> > > +BINARY_DEPS += libvirtd
> > >  endif
> > >  endif
> > >  
> > > 
> > > -- 
> > > 2.44.2
> > > 
> > > 
> 
> -- 
> 
> Joel Granados
diff mbox series

Patch

diff --git a/Makefile.min_deps b/Makefile.min_deps
index a1cb99a..d1251b4 100644
--- a/Makefile.min_deps
+++ b/Makefile.min_deps
@@ -13,6 +13,8 @@  BINARY_DEPS += ansible-playbook
 ifneq (y,$(CONFIG_KDEVOPS_FIRST_RUN))
 ifeq (y,$(CONFIG_GUESTFS))
 BINARY_DEPS += virt-builder
+BINARY_DEPS += virsh
+BINARY_DEPS += libvirtd
 endif
 endif