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

Remove ports config, add no-start option, convert boolean-string-args to flags #69

Merged
merged 4 commits into from
Feb 9, 2016

Conversation

manics
Copy link
Member

@manics manics commented Oct 13, 2015

  • Removed admin ports and related --prefix arguments (breaking change)
  • Converted --skip-... [true|false] arguments to flags (breaking change). Replacements:
    • --no-web
    • --delete-old
    • --keep-old-zip
  • Added --no-start option to install/upgrade to disable automatic restart
    • Motivation for this is so that in future docker can exec icegridnode directly, or in case you want to perform some other system configuration before starting omero.

--no-start allows OMERO.server to be installed or upgraded without being (re)started in case further manual intervention is planned.
--skipweb {true,false} has been replaced with a simple --no-web flag
`--skipdelete false` replaced with `--delete-old`
`skipdeletezip true` replaced with `--keep-old-zip`
@pwalczysko
Copy link
Member

Failing on

 ~/Work/omego/omego/main.py install --upgradedb --dbname omero5_1 http://downloads.op...py.org/omero/5.2.0-rc2/artifacts/OMERO.server-5.2.0-rc2-ice35-b10.zip 
usage: main.py [-h] {convert,upgrade,db,version,install,download} ...
main.py: error: unrecognized arguments: --upgradedb

I took the command from #71 (comment) - it apparently worked there - is there any change here which makes --upgradedb to be unrecognized now ?
Would you please suggest some testing commands ?

@manics
Copy link
Member Author

manics commented Dec 2, 2015

That's because this PR was opened before #71. Either I can rebase this, or you can test by checking out master and using scc merge

@pwalczysko
Copy link
Member

Did scc merge

[pwalczysko@ls31619 ~/Work/omego]$  ~/Work/omego/omego/main.py install --upgradedb --dbname omero5_2 http://downloads.openmicroscopy.org/omero/5.2.0/artifacts/OMERO.server-5.2.0-ice35-b12.zip
2015-12-03 17:47:49,801 [omego.upgrad] INFO  UnixInstall: install
2015-12-03 17:47:49,801 [omego.fileut] INFO  Downloading http://downloads.openmicroscopy.org/omero/5.2.0/artifacts/OMERO.server-5.2.0-ice35-b12.zip
2015-12-03 17:47:53,998 [omego.upgrad] INFO  Unzipping OMERO.server-5.2.0-ice35-b12.zip
2015-12-03 17:47:55,878 [omego.upgrad] INFO  Installing ./OMERO.server-5.2.0-ice35-b12 (OMERO-CURRENT)...
2015-12-03 17:47:57,682 [omego.upgrad] WARNI Upgraded server was the same, not deleting
2015-12-03 17:47:57,683 [    omego.db] INFO  DbAdmin: DbAdmin ./OMERO.server-5.2.0-ice35-b12 ...
Traceback (most recent call last):
  File "/Users/pwalczysko/Work/omego/omego/main.py", line 64, in <module>
    entry_point()
  File "/Users/pwalczysko/Work/omego/omego/main.py", line 54, in entry_point
    (Version.NAME, Version)])
  File "/usr/local/lib/python2.7/site-packages/yaclifw/framework.py", line 197, in main
    ns.func(ns)
  File "/Users/pwalczysko/Work/omego/omego/upgrade.py", line 415, in __call__
    UnixInstall(self.NAME, args)
  File "/Users/pwalczysko/Work/omego/omego/upgrade.py", line 70, in __init__
    self.upgrade_db()
  File "/Users/pwalczysko/Work/omego/omego/upgrade.py", line 205, in upgrade_db
    DbAdmin(self.dir, 'upgrade', self.args, self.external)
  File "/Users/pwalczysko/Work/omego/omego/db.py", line 35, in __init__
    psqlv = self.psql('--version')
  File "/Users/pwalczysko/Work/omego/omego/db.py", line 210, in psql
    db, env = self.get_db_args_env()
  File "/Users/pwalczysko/Work/omego/omego/db.py", line 190, in get_db_args_env
    c = self.external.get_config()
  File "/Users/pwalczysko/Work/omego/omego/external.py", line 85, in get_config
    exclusive=False, read_only=True)
  File "/Users/pwalczysko/Work/omego/OMERO.server-5.2.0-ice35-b12/lib/python/omero/config.py", line 101, in __init__
    self.open_source()
  File "/Users/pwalczysko/Work/omego/OMERO.server-5.2.0-ice35-b12/lib/python/omero/config.py", line 163, in open_source
    self.source = open(self.filename, "r")
IOError: [Errno 2] No such file or directory: '/Users/pwalczysko/Work/omego/OMERO.server-5.2.0-ice35-b12/etc/grid/config.xml'
[pwalczysko@ls31619 ~/Work/omego]$ 

This looks like a bug after discussion with @manics - the command should work even with no config.xml file

@pwalczysko
Copy link
Member

Also the upgrade command failed on the config file not being present.
After copying a valid cinfig file from my local server, the command proceeded and the server started.
The --no-web flag worked.
./omego/main.py upgrade --branch OMERO-DEV-merge-build --no-web

I could not do this logic for the --upgradedb command though.
This command does not look in OMERO-CURRENT, but in the unzipped server for the config.
As this is not existing before the execution of this command, and even this command complains when OMERO-CURRENT already exists, the bug is basically disabling the --upgradedb fully.

@pwalczysko
Copy link
Member

The --delete-old option works, although it deletes only the old versions of the server which are from the same line ? (For example ./omego/main.py upgrade --branch OMERO-DEV-latest --no-web --delete-old de;eted the OMERO.server-5.2.0..... folder, but not the OMERO.server-5.1.4... folder)
Expected ?

@pwalczysko
Copy link
Member

./omego/main.py upgrade --branch OMERO-DEV-merge-build --no-web --delete-old --keep-old-zip worked as expected.

@pwalczysko
Copy link
Member

./omego/main.py upgrade --branch OMERO-DEV-latest --no-web --delete-old --no-start worked fine as well.

@pwalczysko
Copy link
Member

Except for the config file problem all seems to be fine. I do not know how to test the admin ports and related--prefix part - no idea how this works, and what should this do.

@manics
Copy link
Member Author

manics commented Jan 15, 2016

This looks like a bug after discussion with @manics - the command should work even with no config.xml file

This was a bug in #74 (which would've been included by scc merge master), should be fixed in manics@ffde65f

The --delete-old option works, although it deletes only the old versions of the server which are from the same line ? ... Expected ?

Yes, only the server which was pointed to by the old OMERO-CURRENT symlink will be deleted.

@manics
Copy link
Member Author

manics commented Jan 15, 2016

I do not know how to test the admin ports and related--prefix part - no idea how this works, and what should this do.

This feature was removed from omero, so this PR removes it from omego.

@pwalczysko
Copy link
Member

I cannot start the server probably because of my local setup, but I went through the workflow in #69 (comment) after I have done scc merge and I got to the point where the server attempted to start. So far beyond the error reported in #69 (comment). I think this is ready to merge.

@pwalczysko
Copy link
Member

Ready to merge.

joshmoore added a commit that referenced this pull request Feb 9, 2016
Remove ports config, add no-start option, convert boolean-string-args to flags
@joshmoore joshmoore merged commit d11032b into ome:master Feb 9, 2016
@manics manics deleted the noports+nostart branch February 9, 2016 10:39
@joshmoore joshmoore added this to the 0.3.0 milestone Feb 10, 2016
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

Successfully merging this pull request may close these issues.

3 participants