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

win_dsc.set_lcm_config does not set multiple values, missing semicolon #34548

Closed
Inveracity opened this issue Jul 8, 2016 · 2 comments
Closed
Labels
Bug broken, incorrect, or confusing behavior Execution-Module P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Milestone

Comments

@Inveracity
Copy link
Contributor

Description of Issue/Question

When setting multiple lcm config values it does not set them correctly

I believe the produced command from win_dsc.set_lcm_config is missing a ; at the end of each parameter string.

example:

cmd += '            ConfigurationMode = "{0}";'.format(config_mode)`
                                             ^
                                    the missing semicolon

Setup

state:

apply_config:
  module.run:
    - name: dsc.set_lcm_config
    - config_mode: 'ApplyOnly',
    - reboot_if_needed: True

configuration command output produced by set_lcm_config():

Configuration SaltConfig {    Node localhost {        LocalConfigurationManager {            ConfigurationMode = "ApplyOnly"            RebootNodeIfNeeded = $true        }}};SaltConfig -OutputPath "C:\DSC\SaltConfig"

error message from faulty command output: ❗

At line:1 char:137
+ ... ConfigurationMode = "ApplyOnly"            RebootNodeIfNeeded = $true ...
+                                                ~~~~~~~~~~~~~~~~~~
Unexpected token 'RebootNodeIfNeeded' in expression or statement.
At line:1 char:125
+ ... igurationManager {            ConfigurationMode = "ApplyOnly"         ...
+                                                                  ~
There is an incomplete property assignment block in the instance definition.
At line:1 char:173
+ ...  "ApplyOnly"            RebootNodeIfNeeded = $true        }}};SaltCon ...
+                                                                 ~
Unexpected token '}' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

with the semicolon everything gets set correctly

Pull request is on the way


Versions Report

master

Salt Version:
           Salt: 2016.3.1

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 0.9.1
   msgpack-pure: Not Installed
 msgpack-python: 0.3.0
   mysql-python: 1.2.3
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.4

System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 4.2.0-41-generic
         system: Linux
        version: Ubuntu 14.04 trusty

minion:

Salt Version:
           Salt: 2016.3.1

Dependency Versions:
           cffi: 1.6.0
       cherrypy: 5.3.0
       dateutil: 2.5.3
          gitdb: 0.6.4
      gitpython: 2.0.2
          ioflo: 1.5.3
         Jinja2: 2.8
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.4
   msgpack-pure: Not Installed
msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)]
   python-gnupg: 0.3.8
         PyYAML: 3.11
          PyZMQ: 15.2.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: 0.2.4
        Tornado: 4.3
            ZMQ: 4.1.2

System Versions:
           dist:
        machine: AMD64
        release: 2012ServerR2
         system: Windows
        version: 2012ServerR2 6.3.9600  Multiprocessor Free
@Ch3LL
Copy link
Contributor

Ch3LL commented Jul 8, 2016

@Inveracity thanks for the PR! We will get this closed once the PR has been merged :)

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Platform Relates to OS, containers, platform-based utilities like FS, system based apps Windows Execution-Module labels Jul 8, 2016
@Ch3LL Ch3LL added this to the Approved milestone Jul 8, 2016
@Inveracity
Copy link
Contributor Author

woohoo, I'll go ahead and close it 📪

rallytime pushed a commit to rallytime/salt that referenced this issue Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
None yet
Development

No branches or pull requests

2 participants