-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Mattermost SMTP port cannot be configured by the module #289
Comments
Explicitely setting a value as a String does not produce the String in the gitlab.rb file.
Do not automagically convert Strings that look like Integer or Float to those types. If the user want an Integer or a Float, just let them put such Integer / Float. If they want a String, let them put a String.
Explicitely setting a value as a String does not produce the String in the gitlab.rb file.
Do not automagically convert Strings that look like Integer or Float to those types. If the user want an Integer or a Float, just let them put such Integer / Float. If they want a String, let them put a String.
Do not automagically convert Strings that look like Integer or Float to those types. If the user want an Integer or a Float, just let them put such Integer / Float. If they want a String, let them put a String.
Explicitely setting a value as a String does not produce the String in the gitlab.rb file.
Do not automagically convert Strings that look like Integer or Float to those types. If the user want an Integer or a Float, just let them put such Integer / Float. If they want a String, let them put a String.
|
We've found many times that deviating from valid puppet types with this decorator will cause no end of issues. Ultimately, this is a problem with the |
|
@smortex what version of gitlab omnibus are you installing? |
|
@LongLiveCHIEF we have updated to the latest code: |
|
@smortex this module is not designed to support a version of gitlab so far out of date. That version of Gitlab was EoL in late 2014, and the Gitlab only supports the last 3 months of releases, and this module typically is only able to support the most current major release and usually the one previous (at the moment that means gitlab-omnibus >= v10`) |
|
Woops, looks-like I copy-pasted the wrong version number! We are running gitlab-ce 11.5.4 (i.e. latest GitLab) |
|
Honestly, despite the fact that this means there's likely a bug upstream that could cause us some big headaches with this module, I still feel way better knowing you're not using a 4 year old version of gitlab 😃 |
|
Hehe, sorry about that. In the meantime, I opened a Merge Request upstream: |
Passing an integer to some configuration parameters prevent gitlab omnibus from
configuring the service correctly, e.g.
```ruby
mattermost['env'] = {
"MM_EMAILSETTINGS_SMTPPORT" => 25
}
```
cause an exception to be raised:
```
================================================================================
Error executing action `create` on resource 'env_dir[/var/opt/gitlab/mattermost/env]'
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Property content must be one of: String, nil! You passed 25.
```
The problem was initialy detected in the puppet-gitlab module, and the
maintainer suggested that the problem would rather be fixed here:
voxpupuli/puppet-gitlab#289
|
FWIW, the Merge Request was merged upstream. It should make it to 11.7.0 due Jan 22nd, 2019. |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Configure e-mail in mattermost:
Apply the catalog.
What are you seeing
Catalog fails to apply:
/etc/gitlab/gitlab.rbis updated according to the change, butgitlab_reconfigurefails with "had an error: Chef::Exceptions::ValidationFailed: Property content must be one of: String, nil!You passed 25."
The
/etc/gitlab/gitlab.rbfile indeed has the value as an Integer and not a String as expected:Quoting the number and triggering
/usr/bin/gitlab-ctl reconfiguremanually does what is expected.What behavior did you expect instead
Since I put a string (
'25') in my configuration, I expect the module to output a string into/etc/gitlab/gitlab.rband not turn it into a number.The numify function is responsible for this, but the name makes me think that removing this feature will break things:
puppet-gitlab/templates/gitlab.rb.erb
Lines 21 to 31 in 51628af
Output log
Any additional information you'd like to impart
The text was updated successfully, but these errors were encountered: