Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No bug Cook section of a potluck install fails #297

Open
heyudude opened this issue Sep 18, 2024 · 4 comments
Open

No bug Cook section of a potluck install fails #297

heyudude opened this issue Sep 18, 2024 · 4 comments

Comments

@heyudude
Copy link

Describe the bug
I get an error in every potluck I try to install.
Normal pot creation is fine
I run Freebsd 14.1

This the output:

Step 23: Clean cook artifacts
Step 24: Install pot local
Step 25: Set file ownership on cook scripts
chown: /usr/local/bin/cook: No such file or directory
chown: /usr/local/share/cook: No such file or directory
ERROR: Set file ownership on cook scripts failed

and step 23-> 25 is:

step "Clean cook artifacts"
rm -rf /usr/local/bin/cook /usr/local/share/cook

step "Install pot local"
tar -C /root/.pot_local -cf - . | tar -C /usr/local -xf -
rm -rf /root/.pot_local

step "Set file ownership on cook scripts"
chown -R root:wheel /usr/local/bin/cook /usr/local/share/cook
chmod 755 /usr/local/share/cook/bin/*

To Reproduce
Steps to reproduce the behavior:

  1. Use this potluck: https://github.com/bsdpot/potluck/tree/master/mariadb
  2. Run this command: mariadb.sh
  3. See error as shown above in the bug section
    I expect the tar -C /root/.pot_local -cf - . | tar -C /usr/local -xf - fails

Expected behavior
The pot is created and mariadb is installed

System configuration - if possible

  • /usr/local/etc/pot/pot.conf
    (not needed I presume as the normal pots are created as I expect and work fine)

** If network related **
not related to network issues, a normal pot works fine with my network settings

@heyudude heyudude added the bug label Sep 18, 2024
@heyudude heyudude changed the title [BUG] Cook xsection of a potluck install fails [BUG] Cook section of a potluck install fails Sep 18, 2024
@heyudude
Copy link
Author

heyudude commented Sep 18, 2024

Dang...
Missed a bit in the instruction:
copy recursive the files to the flavour directory and
pot create -p mariadb -b 14.1 -N public-bridge -t single -f mariadb

Two questions:
1: why not create subdirectories for all the flavour files for (in this case) mariadb in stead of the root of /usr/local/etc/pot/flavours ??
2: could the documentation be enhanced? So this step is documented?

@heyudude heyudude changed the title [BUG] Cook section of a potluck install fails No bug Cook section of a potluck install fails Sep 18, 2024
@grembo
Copy link
Collaborator

grembo commented Sep 18, 2024

Hi @heyudude,

I was in the middle of responding to you while you figured it out yourself. So I still kept my answer, but made it a bit more interesting by using layered images (so the resulting mariadb pot is a bit smaller):

cp -a freebsd-potluck/freebsd-potluck* /usr/local/etc/pot/flavours/.
pot create -p freebsd -f fbsd-update -f freebsd-potluck -t single -b 14.1
cp -a mariadb/mariadb* /usr/local/etc/pot/flavours/.
pot clone -P freebsd -p mariadb -F -v -f fbsd-update -f mariadb

If you want to build images in a clean environment, you could to take a look into https://github.com/bsdpot/potman (it's a bit of effort to get it going though).

The flavours file system structure is due historic reasons (@pizzamig did this in the very beginning). Documentation improvements are welcome.

@grembo grembo added enhancement and removed bug labels Sep 18, 2024
@heyudude
Copy link
Author

heyudude commented Sep 18, 2024

Thanks for the quick answer! Thanks for the mariadb tips

Do I need a Consul server instance? Seems so.

I am still exploring all flavors of jails assistants, appjail, bastille, cbsd. This one is up to now the most easy to use, especially in the networking portion. It works out of the box using bridges and epairs.
Although it is a pity that the documents and the code are somewhat lagging behind. Glad to help whenever I can.

@grembo
Copy link
Collaborator

grembo commented Sep 18, 2024

Do I need a Consul server instance? Seems so.

I don't know this specific image in detail, but looking at it, it seems like it registers node-exporter, mysql-exporter and mariadb services using consul, so they can be resolved using DNS (so it probably also works nicely with nomad). The exact requirements depend on the flavour and are documented in its README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants