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

Ubuntu repo only provides 2.x and NOT FOUND #20000

Closed
Apollon77 opened this issue Nov 11, 2020 · 16 comments
Closed

Ubuntu repo only provides 2.x and NOT FOUND #20000

Apollon77 opened this issue Nov 11, 2020 · 16 comments
Labels
area/packaging area/2.x OSS 2.0 related issues and PRs

Comments

@Apollon77
Copy link

Today I was doing linux updates, and first of all I was veery surprised to get the 2.0.1 as version. infuxdb 2.0 is requiring some work when coming from 1.8 ... so maybe a bad idea to have as "just there" update. So I was a bit "shocked"

Additionally then the follwoing error occured:

Err:1 https://repos.influxdata.com/ubuntu bionic/stable amd64 influxdb amd64 2.0.1
  404  Not Found [IP: 143.204.89.64 443]
E: Failed to fetch https://repos.influxdata.com/ubuntu/pool/stable/i/influxdb/influxdb_2.0.1_amd64.deb  404  Not Found [IP: 143.204.89.64 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
@psteinbachs
Copy link
Contributor

psteinbachs commented Nov 11, 2020

The 2.x package was not intended to be published as we have additional work to do in providing an update transition. As such, the package has been removed from the repo for the moment. You can still download/install it directly via:

wget https://dl.influxdata.com/influxdb/releases/influxdb_2.0.1_amd64.deb && sudo dpkg -i influxdb_2.0.1_amd64.deb

Note if you plan to do this you should follow the appropriate upgrade documentation at https://docs.influxdata.com/influxdb/v2.0/upgrade/

@Apollon77
Copy link
Author

Thank you very much!! And honestly: lucky that the file was not there because else many users would got that upgrade "surprisingly"

@SuperTux88
Copy link

I was one of the people who "upgraded surprisingly" ... but it looks like it didn't actually upgrade/migrate anything. After noticing that everything was broken and the old package was in the repo again, I installed that version again, so "downgraded", and it looks like everything is working again? Can somebody confirm that the new package didn't touch the old data and/or if it's working again, it should be fine? Or should I better restore from a backup?

@CiaranG
Copy link

CiaranG commented Nov 12, 2020

@SuperTux88 Me too. It doesn't upgrade any data unless you manually run influx upgrade (and even then it's a copy, leaving the previous intact). You'll have been running 2.x with an empty database for a while, that's all. There will be some stray files (e.g. config.toml) that you might clean up if you wanted to erase all trace of the unfortunate incident, otherwise everything should be fine.

@psteinbachs
Copy link
Contributor

We welcome community feedback on expected upgrade behavior. We're currently thinking about re-naming the package to influxdb2 so you can have both installed, and then allow use of the alternatives system to switch between v1 or v2. This would facilitate a simpler rollback mechanism. We have no plans at this time to attempt any type of auto upgrade using influx upgrade.

@Apollon77
Copy link
Author

@psteinbachs I think influxdb2 package is a great idea!

@danxmoran danxmoran added the area/2.x OSS 2.0 related issues and PRs label Nov 12, 2020
@danielsreichenbach
Copy link

danielsreichenbach commented Nov 25, 2020

@psteinbachs As frequent user of InfluxDB it would really help to have distinct packages for 1.x and 2.x. We are also managing a Puppet module for InfluxDB and having distinct versioning would make it much easier to make the module work with both branches and possibly provide an upgrade path there too for users.

@psteinbachs
Copy link
Contributor

psteinbachs commented Dec 15, 2020

#20305 and our release of 2.0.3 implements a version distinction via conflicts. If you apt-get upgrade with the influxdb package installed, it will prompt that the influxdb package will be removed and influxdb2 package will be installed.

@Apollon77
Copy link
Author

@psteinbachs Thank you for the info and link, but I'm confused a bit ... above you wrote

If you apt-get upgrade with the influxdb package installed, it will prompt that the influxdb package will be removed and influxdb2 package will be installed.

in the linked issue:

Requires explicit removal of previous package before installing new package

So which is true? ;-)

@Apollon77
Copy link
Author

Apollon77 commented Dec 17, 2020

@psteinbachs BTW: Should it not be better to especially check if there is enough available space to have all influxdb data twice n that system? ;-) Or at least add the "hey we copy all data" to the upgrade info text so that users know before they execute the upgrade shell script!

@psteinbachs
Copy link
Contributor

Requires explicit removal of previous package before installing new package

So which is true? ;-)

Both are true. If you have the influxdb package already installed and wget && dpkg -i the 2.0.3 deb, you'll get a conflict message. If you apt-get upgrade it prompts you and shows that influxdb package will be removed. In both cases, influxdb package is explicitly removed and replaced with influxdb2.

@psteinbachs
Copy link
Contributor

@psteinbachs BTW: Should it not be better to especially check if there is enough available space to have all influxdb data twice n that system? ;-) Or at least add the "hey we copy all data" to the upgrade info text so that users know before they execute the upgrade shell script!

We're investigating changing the way influxd upgrade works so that a full copy isn't necessary, but we'll add a disk space check or at least additional note to the shell script.

@Apollon77
Copy link
Author

If you apt-get upgrade it prompts you and shows that influxdb package will be removed. In both cases, influxdb package is explicitly removed and replaced with influxdb2.

But this makes updating the whole system without influxdb package very meeehhhh because you ways need to do anything manually or you need to read very careful to not install it "unwanted" ....

@danxmoran
Copy link
Contributor

danxmoran commented Dec 21, 2020

Clarifying: At least on Ubuntu, apt-get upgrade won't bump to 2.x, but apt-get install influxdb2 will auto-remove the conflicting influxdb package. In a fresh ubuntu Docker image:

# Add influxdb repo
apt-get update && apt-get install -y wget gnupg
wget -qO- https://repos.influxdata.com/influxdb.key | apt-key add -
source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | tee /etc/apt/sources.list.d/influxdb.list

# Upgrade system, and install InfluxDB
apt-get update && apt-get upgrade -y && apt-get install influxdb -y

# Check version
influx -version # Output: InfluxDB shell version: 1.8.3

# Check that upgrade doesn't pull 2.x
apt-get update && apt-get upgrade -y # Output: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
influx -version # Output: InfluxDB shell version: 1.8.3

# Explicitly install 2.x
apt-get install influxdb2
# Truncated output:
# 
# The following packages will be REMOVED:
#   influxdb
# The following NEW packages will be installed:
#   influxdb2
# 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
# Do you want to continue? [Y/n]

# Confirm, and see this output:
# 
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# ! Important 1.x to 2.x Upgrade Notice !
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# 
# Thank you for installing InfluxDB v2.  Due to significant changes between
# the v1 and v2 versions, upgrading to v2 requires additional steps.  If
# upgrading to v2 was not intended, simply re-install the v1 package now.
# 
# An upgrade helper script is available that should be reviewed and executed
# prior to starting the influxdb systemd service.  In order to start the v2
# upgrade, execute the following:
# 
# sudo /usr/share/influxdb/influxdb2-upgrade.sh
# 
# Visit our website for complete details on the v1 to v2 upgrade process:
# https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/
# 
# For new or upgrade installations, please review the getting started guide:
# https://docs.influxdata.com/influxdb/v2.0/get-started/

# Confirm 2.x is installed
influx version # Output: Influx CLI 2.0.3 (git: fe04d346df) build_date: 2020-12-15T01:00:16Z

@danxmoran
Copy link
Contributor

I'm going to close this issue, as I believe we've fixed the originally-reported problem in v2.0.3 & spun out separate issues for other ideas that came up during discussion.

@Apollon77 if more surprises appear during your testing please do file new issues. Improving the upgrade process is still one of our top priorities, it's just tough to keep track of all the work when issues scope-creep 😄

@Apollon77
Copy link
Author

Thank you! I will see when I find time to check it out completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging area/2.x OSS 2.0 related issues and PRs
Projects
None yet
Development

No branches or pull requests

6 participants