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

[Bug] make create-demo-cluster问题 #746

Closed
1 of 2 tasks
paymanfu opened this issue Dec 3, 2024 · 10 comments · Fixed by #747
Closed
1 of 2 tasks

[Bug] make create-demo-cluster问题 #746

paymanfu opened this issue Dec 3, 2024 · 10 comments · Fixed by #747
Labels
type: Bug Something isn't working

Comments

@paymanfu
Copy link

paymanfu commented Dec 3, 2024

Apache Cloudberry version

main branch

What happened

image
执行 make create-demo-cluster以后,由于之前没有ssh localhost,这里就一直打点号

What you think should happen instead

No response

How to reproduce

不应该有..... 这些输出,没有给用户输入yes or no的间隙

Operating System

Welcome to Huawei Cloud Service  [root@2x86-64-6d1e ~]# cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"  CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

Anything else

No response

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

@paymanfu paymanfu added the type: Bug Something isn't working label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Hey, @paymanfu welcome!🎊 Thanks for taking the time to point this out.🙌

@yihong0618
Copy link
Contributor

for this gpdb have a better solution by higuoxing if its the same host we can skip this,
more: greenplum-db/gpdb-archive@237eac4

also it can speed up test in local @avamingli

@avamingli
Copy link
Contributor

Hi, @paymanfu Could you please rewrite in English so other engineers could participant, thanks!

@avamingli
Copy link
Contributor

for this gpdb have a better solution by higuoxing if its the same host we can skip this, more: greenplum-db/gpdb-archive@237eac4

also it can speed up test in local @avamingli

@yihong0618 Thanks! Your advise do save a lot of time.

@avamingli
Copy link
Contributor

for this gpdb have a better solution by higuoxing if its the same host we can skip this, more: greenplum-db/gpdb-archive@237eac4
also it can speed up test in local @avamingli

@yihong0618 Thanks! Your advise do save a lot of time.

I'm not familiar with Python codes, but I believe others might be able to help.

@Smyatkin-Maxim
Copy link

It's been this way forever, you need to setup some ssh keys for GP segments to communicate. Something like this works for linux:

ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Depending on your setup you might also ssh-add your key.

But, indeed, we better just cherrypick the GP7 commit, it's a good one.

@edespino
Copy link
Contributor

edespino commented Dec 3, 2024

I actually believe the user does have an ssh key created and in the proper location. The error would be different if it didn't exist. I believe the issue is that the initial host verification has not taken place. One can use ssh-keyscan to help with this. Essentially run the following replacing HOSTNAME for all hosts in the cluster. This should fix your issue:

ssh-keyscan HOSTNAME >> ~/.ssh/known_hosts

TL;DR ssh-keyscan is a utility that helps gather the public SSH host keys of a number of hosts. How does it helps with the initial SSH connection to a system? By building .ssh/known_hosts: ssh-keyscan collects the public keys of remote hosts and adds them to the .ssh/known_hosts file. This file is used by SSH to verify the identity of the remote host, preventing man-in-the-middle attacks.

@avamingli
Copy link
Contributor

I actually believe the user does have an ssh key created and in the proper location. The error would be different if it didn't exist. I believe the issue is that the initial host verification has not taken place. One can use ssh-keyscan to help with this. Essentially run the following replacing HOSTNAME for all hosts in the cluster. This should fix your issue:

ssh-keyscan HOSTNAME >> ~/.ssh/known_hosts

TL;DR ssh-keyscan is a utility that helps gather the public SSH host keys of a number of hosts. How does it helps with the initial SSH connection to a system? By building .ssh/known_hosts: ssh-keyscan collects the public keys of remote hosts and adds them to the .ssh/known_hosts file. This file is used by SSH to verify the identity of the remote host, preventing man-in-the-middle attacks.

+1, Hi, @paymanfu have you done these steps as the official doc?
we have all steps including ssh in https://github.com/apache/cloudberry/blob/main/deploy/build/README.Linux.md

useradd gpadmin # Creates gpadmin user
su - gpadmin # Uses the gpadmin user
ssh-keygen # Creates SSH key
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
exit

so that you can run ssh localhost without a password.

In GPDB, the xxxxOS.README files are listed under the src root dir, but CBDB moved those into deep dir deploy/build/.
I don't know the reason, perhaps we should move them back to make it easy for new comers find them.

@avamingli
Copy link
Contributor

But, indeed, we better just cherrypick the GP7 commit, it's a good one.

+1

@yihong0618
Copy link
Contributor

Just cherry-pick two commit refer to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants