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

Upgrade path from 0.8? #200

Closed
brylie opened this issue Dec 7, 2015 · 14 comments
Closed

Upgrade path from 0.8? #200

brylie opened this issue Dec 7, 2015 · 14 comments
Milestone

Comments

@brylie
Copy link
Contributor

brylie commented Dec 7, 2015

After we upgraded to 0.9 and rebooted the system, we get the following error:

/etc/init.d/api-umbrella: line 41: api-umbrella: command not found

As a result, the API Umbrella service will not load.

@brylie brylie changed the title After 0.9 upgrade: /etc/init.d/api-umbrella: line 41: api-umbrella: command not found after After 0.9 upgrade: /etc/init.d/api-umbrella: line 41: api-umbrella: command not found Dec 7, 2015
@GUI
Copy link
Member

GUI commented Dec 7, 2015

Can you try runninng the following commands and posting the output?

ls -l /usr/bin/api-umbrella*
ls -l /opt/api-umbrella/bin

@brylie
Copy link
Contributor Author

brylie commented Dec 11, 2015

Here are the results of the commands you posted:

$ ls -l /usr/bin/api-umbrella*
ls: cannot access /usr/bin/api-umbrella*: No such file or directory
$ ls -l /opt/api-umbrella/bin
total 0
lrwxrwxrwx 1 root root 46 marra 28 03:10 api-umbrella -> ../embedded/apps/core/current/bin/api-umbrella

@brylie
Copy link
Contributor Author

brylie commented Dec 11, 2015

Additionally, the following commands return nothing:

$ sudo ls -l /usr/bin | grep api
$ sudo ls -l /usr/bin | grep umbrella

@brylie
Copy link
Contributor Author

brylie commented Dec 11, 2015

If I understand correctly where you are going with this, I ran the following commands:

$ sudo ln -s /opt/api-umbrella/bin/api-umbrella /usr/bin/api-umbrella
$ sudo service api-umbrella start
  * Starting API Umbrella api-umbrella 

Still, the API Umbrella application does not load when requesting the server through a web browser.

@brylie
Copy link
Contributor Author

brylie commented Dec 11, 2015

We retried the upgrade again with the following steps:

Verify Ubuntu version and upgrade system

$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

$ sudo apt-get update && sudo apt-get upgrade -y

Add API Umbrella repository and run installer

$ echo "deb https://dl.bintray.com/nrel/api-umbrella-ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/api-umbrella.list
$ sudo apt-get update
$ sudo apt-get install api-umbrella

Warnings

Warnings during the installation process:

Unpacking api-umbrella (0.9.0-1~trusty) over (0.8.0-1) ...
dpkg: warning: unable to delete old directory '/opt/api-umbrella/embedded/apps/web/shared/log': Directory not empty
dpkg: warning: unable to delete old directory '/opt/api-umbrella/embedded/apps/web/shared': Directory not empty
dpkg: warning: unable to delete old directory '/opt/api-umbrella/embedded/apps/web': Directory not empty

Configuration overwrites

Then, some configuration overwrite messages:

Configuration file '/etc/init.d/api-umbrella'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** api-umbrella (Y/I/N/O/D/Z) [default=N] ?
...
Configuration file '/etc/logrotate.d/api-umbrella'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer
...

I answered Y to both.

Server unavailable

At this point, the web server was unreachable from a browser, so:

$ sudo reboot now
$ sudo service api-umbrella start
 * Starting API Umbrella api-umbrella                                                                /etc/init.d/api-umbrella: line 41: api-umbrella: command not found

Same error as the original message.

@brylie brylie changed the title After 0.9 upgrade: /etc/init.d/api-umbrella: line 41: api-umbrella: command not found Upgrade path from 0.8? Dec 11, 2015
@GUI
Copy link
Member

GUI commented Dec 14, 2015

Thanks for reporting this. I've identified a couple issues with the upgrade process and some extra files being marked as config files in the .deb packages. I think we should have new packages released Monday or Tuesday to resolve these issues.

@GUI GUI added this to the v0.10 milestone Dec 15, 2015
@GUI
Copy link
Member

GUI commented Dec 15, 2015

This has been fixed in 629dc34 New v0.10 packages will be released tomorrow, which should make upgrading as easy as apt-get install api-umbrella.

@GUI GUI closed this as completed Dec 15, 2015
@GUI
Copy link
Member

GUI commented Dec 16, 2015

v0.10 packages are now published. Give a shout if you're still having any trouble upgrading.

@brylie
Copy link
Contributor Author

brylie commented Dec 16, 2015

@GUI, I ran the install process using 0.10 packages on an 0.8 instance. The install seems to have succeeded, but the ApiUmbrellaWeb service does not respond to requests to / or /admin.

Additionally, I got an error when I tried to upgrade instead of install:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  api-umbrella

@GUI
Copy link
Member

GUI commented Dec 16, 2015

@brylie: After upgrading, can you try running sudo /etc/init.d/api-umbrella start? Sorry I forgot to mention that, but if you're upgrading from v0.8 on Ubuntu or Debian, you have to explicitly start API Umbrella again after upgrading. This shouldn't be an issue moving forward, since we're now explicitly testing the various upgrade paths for packages, but due to the post-removal package scripts in v0.8 and the ordering of callbacks for .debs, you'll need this manual start after upgrading this time (and we can't do much to solve it, since it's an issue with the v0.8 package).

Let me know if that doesn't do the trick, though.

Regarding apt-get upgrade not working, based on http://askubuntu.com/a/602, I think that's maybe expected since we had to add a dependency to the packages. It sounds like any dependency changes might trigger this, so apt-get install api-umbrella should probably be the preferred way to update the package (api-get upgrade also tries to update the whole system, so that may update more packages than you want).

@brylie
Copy link
Contributor Author

brylie commented Dec 16, 2015

@elnzv reported that he was able to successfully upgrade from 0.8 to 0.10, and will test on a clone of our main VM.

Also, I did try the sudo /etc/init.d/api-umbrella start and restart, but got a message similar to "API Umbrella is already running."

@jykae
Copy link

jykae commented Jan 11, 2016

tailf /var/log/api-umbrella/nginx/current is looping error:

[emerg] 17617#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

@GUI any idea how I could fix this ? where I can find "server_names_hash_bucket_size" ?

@brylie
Copy link
Contributor Author

brylie commented Jan 11, 2016

@GUI, may we please re-open this issue until we have a successful upgrade path?

@brylie
Copy link
Contributor Author

brylie commented Jan 11, 2016

@jykae the hash_bucket_size issue was discussed and marked as resolved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants