vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.03k stars 698 forks source link

tdnf upgrade doesn't work. #301

Closed Spacial closed 8 years ago

Spacial commented 9 years ago

The tdnf upgrade command doesn't work, says it lacks arguments (not compliant with the docs).

Tried even with distro-sync, without success

root [ /etc/yum.repos.d ]# tdnf check-update
photon-release.noarch 1.1-1 photon yum.noarch 3.4.3-2 photon Linux-PAM.x86_64 1.1.8-2 photon Linux-PAM-lang.x86_64 1.1.8-2 photon autoconf.x86_64 2.69-3 photon automake.x86_64 1.14.1-2 photon bash.x86_64 4.3-2 photon bash-lang.x86_64 4.3-2 photon bison.x86_64 3.0.2-2 photon bzip2.x86_64 1.0.6-3 photon bzip2-devel.x86_64 1.0.6-3 photon check.x86_64 0.9.14-2 photon cloud-init.x86_64 0.7.6-3 photon cloud-init.x86_64 0.7.6-4 photon cmake.x86_64 3.2.1-2 photon cracklib.x86_64 2.9.2-2 photon cracklib-dicts.x86_64 2.9.2-2 photon cracklib-python.x86_64 2.9.2-2 photon cyrus-sasl.x86_64 2.1.26-2 photon dbus.x86_64 1.8.8-2 photon dbus.x86_64 1.8.8-3 photon diffutils.x86_64 3.3-2 photon docbook-xml.x86_64 4.5-2 photon docbook-xml.x86_64 4.5-3 photon docbook-xsl.x86_64 1.78.1-2 photon docker.x86_64 1.7.0-1 photon dparted.x86_64 0.1-2 photon e2fsprogs.x86_64 1.42.9-2 photon e2fsprogs-devel.x86_64 1.42.9-2 photon elfutils.x86_64 0.158-2 photon elfutils-devel.x86_64 0.158-2 photon elfutils-devel-static.x86_64 0.158-2 photon elfutils-libelf.x86_64 0.158-2 photon elfutils-libelf-devel.x86_64 0.158-2 photon elfutils-libelf-devel-static.x86_64 0.158-2 photon filesystem.x86_64 7.5-4 photon filesystem.x86_64 7.5-7 photon flex.x86_64 2.5.38-2 photon gawk.x86_64 4.1.0-2 photon gcc.x86_64 4.8.2-4 photon glib.x86_64 2.42.0-3 photon glib-devel.x86_64 2.42.0-3 photon glibc.x86_64 2.21-2 photon glibc-devel.x86_64 2.21-2 photon glibc-lang.x86_64 2.21-2 photon glibmm.x86_64 2.42.0-3 photon gobject-introspection.x86_64 1.43.3-2 photon gobject-introspection-devel.x86_64 1.43.3-2 photon gobject-introspection-python.x86_64 1.43.3-2 photon gpgme.x86_64 1.5.3-2 photon gpgme-devel.x86_64 1.5.3-2 photon grub.x86_64 2.02-1 photon grub-lang.x86_64 2.02-1 photon gtk-doc.x86_64 1.21-2 photon hawkey.x86_64 2014.1-3 photon hawkey-devel.x86_64 2014.1-3 photon iptables.x86_64 1.4.21-2 photon itstool.x86_64 2.0.2-2 photon json-glib.x86_64 1.0.2-3 photon json-glib-devel.x86_64 1.0.2-3 photon libassuan.x86_64 2.2.0-2 photon libgcc.x86_64 4.8.2-4 photon libgcc-devel.x86_64 4.8.2-4 photon libgomp.x86_64 4.8.2-4 photon libgomp-devel.x86_64 4.8.2-4 photon libsolv.x86_64 0.6.6-2 photon libstdc++.x86_64 4.8.2-4 photon libstdc++-devel.x86_64 4.8.2-4 photon libxml2.x86_64 2.9.1-2 photon libxml2.x86_64 2.9.1-3 photon libxml2-devel.x86_64 2.9.1-2 photon libxml2-devel.x86_64 2.9.1-3 photon linux.x86_64 3.19.2-2 photon linux-dev.x86_64 3.19.2-2 photon linux-docs.x86_64 3.19.2-2 photon mercurial.x86_64 3.1.2-2 photon ncurses.x86_64 5.9-2 photon ncurses-devel.x86_64 5.9-2 photon nspr.x86_64 4.10.8-1 photon nss.x86_64 3.19-1 photon nss-devel.x86_64 3.19-1 photon open-vm-tools.x86_64 9.10.0-3 photon open-vm-tools.x86_64 9.10.0-4 photon openssh.x86_64 6.6p1-2 photon openssh.x86_64 6.6p1-3 photon ostree.x86_64 2015.7-1 photon ostree.x86_64 2015.7-2 photon perl.x86_64 5.18.2-2 photon procps-ng.x86_64 3.3.9-2 photon procps-ng-devel.x86_64 3.3.9-2 photon pycurl.x86_64 7.19.5.1-2 photon python-hawkey.x86_64 2014.1-3 photon python2.x86_64 2.7.9-3 photon python2-devel.x86_64 2.7.9-3 photon python2-libs.x86_64 2.7.9-3 photon python2-tools.x86_64 2.7.9-3 photon readline.x86_64 6.3-3 photon readline-devel.x86_64 6.3-3 photon rpm.x86_64 4.11.2-4 photon rpm-devel.x86_64 4.11.2-4 photon rpm-ostree.x86_64 2015.7-1 photon shadow.x86_64 4.1.5.1-3 photon shadow.x86_64 4.1.5.1-4 photon sudo.x86_64 1.8.11p1-4 photon systemd.x86_64 216-4 photon systemd.x86_64 216-8 photon tdnf.x86_64 1.0.1-2 photon tdnf-devel.x86_64 1.0.1-2 photon texinfo.x86_64 5.2-2 photon unzip.x86_64 6.0-2 photon util-linux.x86_64 2.24.1-2 photon util-linux-lang.x86_64 2.24.1-2 photon vim.x86_64 7.4-4 photon xz.x86_64 5.0.5-2 photon xz-devel.x86_64 5.0.5-2 photon zlib.x86_64 1.2.8-2 photon zlib-devel.x86_64 1.2.8-2 photon root [ /etc/yum.repos.d ]# tdnf distro-sync No such command: distro-sync. Please use /usr/bin/tdnf --help root [ /etc/yum.repos.d ]# tdnf upgrade Error(1622) : Invalid argument

didn't found o docs any tip to a complete upgrade.

Spacial commented 9 years ago

root [ /etc ]# cat photon-release VMware Photon Linux 1.0 TP1

ppadmavilasom commented 9 years ago

tdnf upgrade requires a package name for tdnf-1.0.x aiming for minimal functionality. you should try "tdnf install yum" and upgrade using yum or feed the check-update results to tdnf upgrade one by one "tdnf check-update | cut -f3 -d$'\r' | xargs -n1 tdnf upgrade -y"

Spacial commented 9 years ago

Hi @ppadmavilasom ,

Tried install yum, gave me some errors:

root [ /etc ]# cat photon-release VMware Photon Linux 1.0 TP1 root [ /etc ]# tdnf install yum Error(905) : Nothing to do root [ /etc ]# tdnf search yum yum : RPM installer/updater yum-metadata-parser : A fast metadata parser for yum tdnf : dnf/yum equivalent using C libs root [ /etc ]# tdnf install yum Error(905) : Nothing to do root [ /etc ]# tdnf upgrade yum.noarch Upgrading: yum noarch 3.4.3-2 Is this ok [y/N]:y Downloading 1359026.00 of 1359026.00 Error(1474) : public key is unavailable. install public key using rpm --import or use --nogpgcheck to ignore. root [ /etc ]# tdnf upgrade yum.noarch --nogpgcheck Upgrading: yum noarch 3.4.3-2 Is this ok [y/N]:y Downloading 1359026.00 of 1359026.00 Error(1468) : Unknown error root [ /etc ]# tdnf upgrade rpm.x86_64 rpm-ostree.x86_64 rpm-devel.x86_64 --nogpgcheck Upgrading: rpm x86_64 4.11.2-4 Is this ok [y/N]:y Downloading 1878897.00 of 1878897.00 Error(1468) : Unknown error

even with the script:

root [ /etc/yum.repos.d ]# tdnf check-update | cut -f3 -d$'\r' | xargs -n1 tdnf upgrade -y
Upgrading: yum noarch 3.4.3-2 Downloading 1359026.00 of 1359026.00 Error(1468) : Unknown error Upgrading: Linux-PAM x86_64 1.1.8-2 Downloading 430942.00 of 430942.00 Error(1468) : Unknown error Upgrading: Linux-PAM-lang x86_64 1.1.8-2 Downloading 141390.00 of 141390.00 Error(1468) : Unknown error Upgrading: perl x86_64 5.18.2-2 autoconf x86_64 2.69-3 Error(1471) : rpm generic error - not found Upgrading: perl x86_64 5.18.2-2 automake x86_64 1.14.1-2 Downloading 476694.00 of 476694.00 Error(1468) : Unknown error Upgrading: bash x86_64 4.3-2 Downloading 879995.00 of 879995.00 Error(1468) : Unknown error Upgrading: bash-lang x86_64 4.3-2 Downloading 1165495.00 of 1165495.00 Error(1468) : Unknown error Upgrading: bison x86_64 3.0.2-2 Downloading 475459.00 of 475459.00 Error(1468) : Unknown error Upgrading: bzip2 x86_64 1.0.6-3 Downloading 524921.00 of 524921.00 Error(1468) : Unknown error Upgrading: bzip2-devel x86_64 1.0.6-3 Downloading 4212.00 of 4212.00 Error(1468) : Unknown error Upgrading: gawk x86_64 4.1.0-2 check x86_64 0.9.14-2 Downloading 195879.00 of 195879.00 Error(1468) : Unknown error Upgrading: python2-devel x86_64 2.7.9-3 python2-libs x86_64 2.7.9-3 python2-tools x86_64 2.7.9-3 python2 x86_64 2.7.9-3 cloud-init x86_64 0.7.6-4 Downloading 505662.00 of 505662.00 Error(1468) : Unknown error Upgrading: python2-devel x86_64 2.7.9-3 python2-libs x86_64 2.7.9-3 python2-tools x86_64 2.7.9-3 python2 x86_64 2.7.9-3 cloud-init x86_64 0.7.6-4 Downloading 505662.00 of 505662.00 Error(1468) : Unknown error Upgrading: cmake x86_64 3.2.1-2 Downloading 13211656.00 of 13211656.00 Error(1468) : Unknown error Upgrading: cracklib x86_64 2.9.2-2 Downloading 3216070.00 of 3216070.00 Error(1468) : Unknown error Upgrading: cracklib-dicts x86_64 2.9.2-2 Downloading 3389210.00 of 3389210.00 Error(1468) : Unknown error Upgrading: cracklib-python x86_64 2.9.2-2 Downloading 14766.00 of 14766.00 Error(1468) : Unknown error Upgrading: .....

and does that for all the updates.

ppadmavilasom commented 9 years ago

@Spacial - it seems you have yum installed. could you try - "yum upgrade"? FYI, there was a previous topic on TP1 upgrade to latest and somebody else ran into issues. I am not sure if these are the same. You can certainly try but TP1 upgrade to latest is not a path that is tested or recommended.

Spacial commented 9 years ago

resolved rebuilding the rpm database..

root [ ~ ]# rpm --rebuilddb

root [ ~ ]# yum check-update

but the yum check-update didn't worked as well: .... Total size: 231 M Is this ok [y/N]: y Downloading Packages: Running Transaction Check Running Transaction Test

Transaction Check Error: file /bin from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /opt from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /lib from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /media from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /sbin from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /srv from install of filesystem-7.5-7.x86_64 conflicts with file from package filesystem-7.5-1.x86_64 file /usr/include/librepo/util.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/checksum.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/cleanup.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/downloader.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/downloadtarget.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/fastestmirror.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/handle.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/handle_internal.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/librepo.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/rcodes.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/repoconf.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/result.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/types.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64 file /usr/include/librepo/version.h from install of librepo-devel-1.7.15-1.x86_64 conflicts with file from package librepo-1.17-1.x86_64

Error Summary

Spacial commented 9 years ago

Hi @ppadmavilasom, but if upgrading the TP1 after install isnt recommended, why the packages are available at the repos? It should be another 'version' for unstable?

thanks for you attention

Jacson

Spacial commented 9 years ago

@ppadmavilasom Sorry, the TP1 ins't stable, right?

ppadmavilasom commented 9 years ago

@Spacial on a per package basis, this will work and thats what was intended for TP1. Could you please cat your /etc/yum.repos.d contents? Do you have repositories other than TP1 release repositories?

Spacial commented 9 years ago

@ppadmavilasom Can't, the last upgrade broke everything.

I'll try with the 1.0.0 version now.

ppadmavilasom commented 9 years ago

@Spacial once you have things back up, please post your repos. We should have TP1 repos static from the time of release. Only update i see to TP1 is docker.

Spacial commented 9 years ago

root [ / ]# ls -lsh /etc/yum.repos.d/ 4.0K -rw-r--r-- 1 root root 187 Apr 11 03:24 /etc/yum.repos.d/photon-iso.repo 4.0K -rw-r--r-- 1 root root 214 Jun 5 2015 /etc/yum.repos.d/photon-updates.repo 4.0K -rw-r--r-- 1 root root 199 Jun 5 2015 /etc/yum.repos.d/photon.repo root [ / ]# cat /etc/yum.repos.d/ [photon-iso] name=VMWare Photon Linux 1.0(x86_64) baseurl=file:///media/cdrom/usr/src/photon/RPMS gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY gpgcheck=0 enabled=1 skip_if_unavailable=True [photon-updates] name=VMware Photon Linux 1.0(x86_64)Updates baseurl=https://dl.bintray.com/vmware/photon_updates_1.0_x86_64 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY gpgcheck=0 enabled=1 skip_if_unavailable=True [photon] name=VMware Photon Linux 1.0(x86_64) baseurl=https://dl.bintray.com/vmware/photon_release_1.0_x86_64 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY gpgcheck=0 enabled=1 skip_if_unavailable=True

It was a FULL installation

ppadmavilasom commented 9 years ago

Which iso did you use for this? What is the version of your photon-release rpm?

Spacial commented 9 years ago

root [ ~ ]# rpm -qa | grep photon photon-release-1.0-1.noarch root [ ~ ]# cat /etc/photon-release VMware Photon Linux 1.0 TP1

ISO: photon-1.0.0-195.iso md5sum photon-1.0.0-195.iso 76981b07456c21317a386ffb5ac0f17c photon-1.0.0-195.iso

I'm going to install just the stable (1.0.0) release... md5sum photon.iso 90d92a792d3f5d1348ddf1f376cc7959 photon.iso

jreypo commented 8 years ago

@Spacial Had similar issues with Photon TP2. There seems to be an issue in tdnf upgrade if the tdnf has not been upgrading before.

Execute tdnf upgrade tdnf and after that you can execute tdnf upgrade -y and all packages will be updated.

@ppadmavilasom I've verified this in TP2 installation from ISO and OVA sources.