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 from 2.0.0 to 2.0.1 failed #11786

Closed
svpcom opened this Issue Mar 5, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@svpcom
Copy link

svpcom commented Mar 5, 2019

When I try to upgrade from 2.0.0 to 2.0.1 i got:

...
Node version 8.11.1 and yarn version 1.7.0 are already installed.
Generated Camo config file /etc/default/camo
generate_secrets: No new secrets to generate.
2019-03-05 04:59:19,927 upgrade-zulip-stage-2: Installing static assets...
2019-03-05 04:59:20,762 upgrade-zulip-stage-2: Checking for needed migrations
process-fts-updates: ERROR (not running)
2019-03-05 04:59:22,974 upgrade-zulip-stage-2: Stopping Zulip...
zulip-django: ERROR (not running)
zulip-tornado: ERROR (not running)
zulip-thumbor: ERROR (not running)
2019-03-05 04:59:23,103 upgrade-zulip-stage-2: Applying puppet changes...
Warning: The string '4038176' was automatically coerced to the numerical value 4038176 (file: /home/zulip/deployments/2019-03-05-04-59-14/puppet/zulip/manifests/base.pp, line: 93, column: 19)
Error: Evaluation Error: Cannot reassign variable '$uploads_route' (file: /home/zulip/deployments/2019-03-05-04-59-14/puppet/zulip/manifests/nginx.pp, line: 47, column: 20) on node zulip.flashgrid.io
Traceback (most recent call last):
  File "/home/zulip/deployments/2019-03-05-04-59-14/scripts/lib/upgrade-zulip-stage-2", line 170, in <module>
    subprocess.check_call(["./scripts/zulip-puppet-apply", "--force"])
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./scripts/zulip-puppet-apply', '--force']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/home/zulip/deployments/current/scripts/lib/upgrade-zulip", line 58, in <module>
    + deploy_options)
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/zulip/deployments/2019-03-05-04-59-14/scripts/lib/upgrade-zulip-stage-2', '/home/zulip/deployments/2019-03-05-04-59-14']' returned non-zero exit status 1.

nginx.pp line 47 is:

if $no_serve_uploads != '' {
    # If we're not serving uploads locally, set the appropriate API headers for it.
    $uploads_route = 'puppet:///modules/zulip/nginx/zulip-include-maybe/uploads-route.noserve'
  }
@timabbott

This comment has been minimized.

Copy link
Member

timabbott commented Mar 5, 2019

@svpcom can you talk about what file upload configuration you're using, and what OS version? This seems like a puppet version compatibility problem.

@zulipbot

This comment has been minimized.

Copy link
Member

zulipbot commented Mar 6, 2019

Hello @zulip/server-production members, this issue was labeled with the "area: production" label, so you may want to check it out!

@svpcom

This comment has been minimized.

Copy link
Author

svpcom commented Mar 6, 2019

@timabbott Ubuntu 18.04.2 LTS

@svpcom

This comment has been minimized.

Copy link
Author

svpcom commented Mar 6, 2019

Puppet doesn't allow redefine already defined variables. I've fix this as:

$no_serve_uploads = zulipconf('application_server', 'no_serve_uploads', '')
  if $no_serve_uploads != '' {
    # If we're not serving uploads locally, set the appropriate API headers for it.
    $uploads_route = 'puppet:///modules/zulip/nginx/zulip-include-maybe/uploads-route.noserve'
  }else{
     $uploads_route = $zulip::base::release_name ? {
      'trusty' => 'puppet:///modules/zulip/nginx/zulip-include-maybe/uploads-route.direct',
      default  => 'puppet:///modules/zulip/nginx/zulip-include-maybe/uploads-route.internal',
     }
  }
@timabbott

This comment has been minimized.

Copy link
Member

timabbott commented Mar 6, 2019

@svpcom ahh, I figured out that the problem was in our test environment for this code path. Fixed, and thanks for the report!

@timabbott timabbott closed this Mar 6, 2019

timabbott added a commit that referenced this issue Mar 6, 2019

puppet: Fix nginx configuration logic for S3 backend.
Apparently, our testing environment for this configuration was broken
and didn't test the code we thought it did; as a result, a variable
redefinition bug slipped through.

Fixes #11786.

mateuszmandera added a commit to mateuszmandera/zulip that referenced this issue Mar 9, 2019

puppet: Fix nginx configuration logic for S3 backend.
Apparently, our testing environment for this configuration was broken
and didn't test the code we thought it did; as a result, a variable
redefinition bug slipped through.

Fixes zulip#11786.

timabbott added a commit to timabbott/zulip that referenced this issue Mar 13, 2019

puppet: Fix nginx configuration logic for S3 backend.
Apparently, our testing environment for this configuration was broken
and didn't test the code we thought it did; as a result, a variable
redefinition bug slipped through.

Fixes zulip#11786.

Nikhil-Vats added a commit to Nikhil-Vats/zulip that referenced this issue Mar 17, 2019

puppet: Fix nginx configuration logic for S3 backend.
Apparently, our testing environment for this configuration was broken
and didn't test the code we thought it did; as a result, a variable
redefinition bug slipped through.

Fixes zulip#11786.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.