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] gppkg -r is invalid #151

Open
1 of 2 tasks
chenfool opened this issue Aug 16, 2023 · 3 comments
Open
1 of 2 tasks

[Bug] gppkg -r is invalid #151

chenfool opened this issue Aug 16, 2023 · 3 comments
Assignees
Labels
status: Completed This label means issues are done, closed, fixed or resovled. type: Bug Something isn't working

Comments

@chenfool
Copy link

chenfool commented Aug 16, 2023

Cloudberry Database version

1.3.0

What happened

gppkg -r is invalid

What you think should happen instead

【Execution Step】
After using gppkg -i command to install zombodb plug-in, but hope to uninstall the plug-in

Install Command

gppkg -i zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg

20230816:11:06:26:387500 gppkg:gp1:gpadmin-[INFO]:-Starting gppkg with args: -i zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:06:26:387500 gppkg:gp1:gpadmin-[INFO]:-Installing package zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:06:27:387500 gppkg:gp1:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix /usr/local/cloudberry-db-1.3.0'
20230816:11:06:27:387500 gppkg:gp1:gpadmin-[INFO]:-Installing zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg locally
20230816:11:06:28:387500 gppkg:gp1:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix /usr/local/cloudberry-db-1.3.0'
20230816:11:06:28:387500 gppkg:gp1:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i --force /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix=/usr/local/cloudberry-db-1.3.0'
20230816:11:06:28:387500 gppkg:gp1:gpadmin-[INFO]:-Completed local installation of zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg.
20230816:11:06:28:387500 gppkg:gp1:gpadmin-[INFO]:-Zombodb has been installed successfully
20230816:11:06:28:387500 gppkg:gp1:gpadmin-[INFO]:-zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg successfully installed.

Uninstall Command

gppkg -r zombodb

20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Starting gppkg with args: -r zombodb
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Uninstalling package zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Validating rpm uninstallation cmdStr='rpm --test -e zombodb_centos7_pg14-3000.1.5 --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database'
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Validating rpm uninstallation cmdStr='rpm --test -e zombodb_centos7_pg14-3000.1.5 --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database'
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Completed local uninstallation of zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg.
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-Zombodb has been uninstalled successfully
20230816:11:53:01:391125 gppkg:gp1:gpadmin-[INFO]:-zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg successfully uninstalled.

Reinstall -- [fail]

gppkg -i zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg

20230816:11:53:30:391175 gppkg:gp1:gpadmin-[INFO]:-Starting gppkg with args: -i zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:53:31:391175 gppkg:gp1:gpadmin-[INFO]:-Installing package zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:53:31:391175 gppkg:gp1:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix /usr/local/cloudberry-db-1.3.0'
20230816:11:53:31:391175 gppkg:gp1:gpadmin-[CRITICAL]:-gppkg failed. (Reason=''zombodb-14-3000.1.5-1.x86_64.rpm'') exiting...

Rerun the uninstallation command, display plug-in does not exist

gppkg -r zombodb
20230816:11:53:36:391198 gppkg:gp1:gpadmin-[INFO]:-Starting gppkg with args: -r zombodb
20230816:11:53:36:391198 gppkg:gp1:gpadmin-[ERROR]:-gppkg error: Package zombodb has not been installed.

But execute the gppkg -u update command, display succussfully

gppkg -u zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg

20230816:11:54:09:391241 gppkg:gp1:gpadmin-[INFO]:-Starting gppkg with args: -u zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:54:09:391241 gppkg:gp1:gpadmin-[WARNING]:-WARNING: The process of updating a package includes removing all
20230816:11:54:09:391241 gppkg:gp1:gpadmin-[WARNING]:-previous versions of the system objects related to the package. For
20230816:11:54:09:391241 gppkg:gp1:gpadmin-[WARNING]:-example, previous versions of shared libraries are removed.
20230816:11:54:09:391241 gppkg:gp1:gpadmin-[WARNING]:-After the update process, a database function will fail when it is
20230816:11:54:09:391241 gppkg:gp1:gpadmin-[WARNING]:-called if the function references a package file that has been removed.
Do you still want to continue ? Yy|Nn (default=N):
> y
20230816:11:54:10:391241 gppkg:gp1:gpadmin-[INFO]:-Updating package zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg
20230816:11:54:10:391241 gppkg:gp1:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -U --force /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix /usr/local/cloudberry-db-1.3.0'
20230816:11:54:11:391241 gppkg:gp1:gpadmin-[INFO]:-Installing zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg locally
20230816:11:54:11:391241 gppkg:gp1:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -U --force /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix /usr/local/cloudberry-db-1.3.0'
20230816:11:54:12:391241 gppkg:gp1:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -U --force /usr/local/cloudberry-db-1.3.0/.tmp/zombodb_centos7_pg14-3000.1.5.x86_64.rpm --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database --prefix=/usr/local/cloudberry-db-1.3.0'
20230816:11:54:12:391241 gppkg:gp1:gpadmin-[INFO]:-Completed local installation of zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg.
20230816:11:54:12:391241 gppkg:gp1:gpadmin-[INFO]:-Zombodb has been updated successfully
20230816:11:54:12:391241 gppkg:gp1:gpadmin-[INFO]:-zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg successfully updated.

【ERROR Analysis】
When executing uninstall the plug-in, gppkg -r **, execute rpm --test twice, but do not execute rpm -e uninstall the plug-in.
And rpm --test plug-in's name is wrong.

rpm --test -e zombodb_centos7_pg14-3000.1.5 --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database

rpm --test -e zombodb_centos7_pg14-3000.1.5 --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database
error: package zombodb_centos7_pg14-3000.1.5 is not installed

rpm -aq --dbpath /usr/local/cloudberry-db-1.3.0/share/packages/database
zombodb-14-3000.1.5-1.x86_64

【Other】
when executing gppkg -r command, the person can use the plug-in full name.

How to reproduce

gppkg -i zombodb-3000.1.5-cbdb1-centos7-x86_64-37227-release.gppkg

Operating System

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

@chenfool chenfool added the type: Bug Something isn't working label Aug 16, 2023
@github-actions
Copy link

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

@tuhaihe
Copy link
Member

tuhaihe commented Aug 16, 2023

Hi @chenfool: thanks for your report! Since we prefer all communications in English, it would be better if you rewrote your issue in English. However, if the original language version describes the issue more clearly, you can keep both versions. Hope it makes sense.

@chenfool chenfool changed the title [Bug] gppkg 卸载无效 [Bug] gppkg -r is invalid Aug 16, 2023
@roseduan roseduan added the status: Completed This label means issues are done, closed, fixed or resovled. label Aug 21, 2023
@roseduan
Copy link
Contributor

I have fixed this in zombodb repo, which will be included in the next release.
@chenfool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: Completed This label means issues are done, closed, fixed or resovled. type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants