Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@edespino
Copy link
Contributor

@edespino edespino commented Sep 9, 2024

  • Retire usage of CentOS 7 for release builds.
  • Rocky Linux 9 will be used for release and main containers.
  • Make the gpadmin user the default user when entering the container.
  • Update 000-cbdb-sandbox README.md with appropriate updates.
  • When entering the container, the default directory will be /home/gpadmin
  • The environment variable USER is not set to gpadmin
  • In the init script, COORDINATOR _DATA_DIRECTORY is set so gpstop -u functions as expected.

@tuhaihe
Copy link
Member

tuhaihe commented Sep 9, 2024

Great! Will test later.

@antoniopetrole
Copy link
Member

antoniopetrole commented Sep 10, 2024

So I tested this with the following options including running the smoke test for all of them (I'm on an ARM M2 chip btw)

  1. run.sh
  2. run.sh -m
  3. run.sh -c main
  4. run.sh -m -c main

Everything installs just fine, however the smoke test fails on lesson 1 due to an error from gpconfig. You can test this error by just running the command below manually. I'm not familiar with this USER env variable for some reason but if I run export USER=gpadmin then everything runs fine. So I'm assuming should be setting this variable so gpconfig works and the tutorial lessons work as well.

[gpadmin@mdw tmp]$ gpconfig -l
20240910:08:42:17:005788 gpconfig:mdw:gpadmin-[ERROR]:-USER environment variable must be set.
USER environment variable must be set.

The only other feedback I have is we can remove the warning about the image not working on ARM based CPU's since that was purely an issue with just the CentOS 7 image (the container would come up but the yum repo would be broken since the ARM link was a 404 I believe). Rocky 9 works fine on my machine.

https://github.com/edespino/bootcamp/blob/b0904fa9fcc4cc54492be14031b62bb7cdc00230/000-cbdb-sandbox/README.md?plain=1#L47
https://github.com/edespino/bootcamp/blob/b0904fa9fcc4cc54492be14031b62bb7cdc00230/000-cbdb-sandbox/README.md?plain=1#L53

Everything else seems great and I'm happy with how you've removed all of the "su -l" logic and simplified the run script, supporting multiple OS's felt weird to me since really what we're trying to highlight here is Cloudberry's features 😄

@antoniopetrole
Copy link
Member

Actually just noticed another thing. When you run gpstop -u in your init script, it's actually failing in the gpAdminLogs on all mutations of the commands I ran

20240910:09:08:12:003949 gpstop:mdw:gpadmin-[INFO]:-Terminating processes for segment /data0/database/master/gpseg-1
20240910:09:08:21:005379 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -u
20240910:09:08:21:005379 gpstop:mdw:gpadmin-[CRITICAL]:-gpstop failed. (Reason='unsupported operand type(s) for +: 'NoneType' and 'str'') exiting...

This means you can't actually connect to the container from your host machine using something like psql or DBeaver because the pg_hba.conf changes never get loaded into memory. I manually ran gpstop -u and it seems to work fine after and I can connect from my local host machine's psql so I'm not sure what's happening here (maybe a race condition with the DB initializing still in the background?)

@edespino
Copy link
Contributor Author

@antoniopetrole & @tuhaihe Both issues are addressed. Thank you for identifying them. Please review again at your earliest convenience.

@tuhaihe
Copy link
Member

tuhaihe commented Sep 11, 2024

Test all the commands on X86_64 and Apple M2, they work well. 👍

Only one comment that we can remove the description (currently does not support ARM CPU's such as Apple M1/M2) from the file 000-cbdb-sandbox/README.md.

* Rocky Linux 9 will be used for release container.
* Make the gpadmin user the default user when entering the container.
* Set USER environmetn variable
* Set COORDINATOR_DATA_DIRECTRY environmetn variable
* Set default working directorty (WORKDIR) /home/gpadmin
* Remove unnecessary cd $HOME
* Remove - currently does not support ARM CPU's such as Apple M1/M2
@edespino edespino merged commit a63fb37 into apache:main Sep 11, 2024
@edespino edespino deleted the all-rockylinux9 branch September 11, 2024 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants