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

Too many hostnames in pillar? #33389

Closed
DaveQB opened this issue May 20, 2016 · 7 comments
Closed

Too many hostnames in pillar? #33389

DaveQB opened this issue May 20, 2016 · 7 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P4 Priority 4 Pillar severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@DaveQB
Copy link
Contributor

DaveQB commented May 20, 2016

If I had one more minion name to a single line patter in the pillar top.sls file I get an error saying

"could not found expected ':'; line 80"

Setup

This woks:

'tst-www-apm-edu-au02-ap-southeast-2b.think.vpc or tst-www-ancb-edu-au02-ap-southeast-2b.think.vpc or tst-www-billyblue-edu-au02-ap-southeast-2b.think.vpc or tst-www-catc-edu-au02-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-www-jni-edu-au02-ap-southeast-2b.think.vpc or tst-www-ssnt-edu-au02-ap-southeast-2b.think.vpc or tst-www-torrens-edu-au02-ap-southeast-2b.think.vpc or tst-www-think-edu-au02-ap-southeast-2b.think.vpc or tst-www-williamblue-edu-au02-ap-southeast-2b.think.vpc or tst-acnt.edu.au02-ap-southeast-2b.think.vpc or tst-ancb.edu.au02-ap-southeast-2b.think.vpc or tst-billyblue.edu.au-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-ssnt.edu.au02-ap-southeast-2b.think.vpc or tst-staff-test-think-edu-au01-ap-southeast-2b.think.vpc or tst-williamblue.edu.au-ap-southeast-2b.think.vpc or tst-b2cwp01-ap-southeast-2b.think.vpc or tst-frontier04-ap-southeast-2b.think.vpc or tst-phidu-torrens-edu-au-ap-southeast-2b.think.vpc':
  - current

This gives the error

'tst-www-apm-edu-au02-ap-southeast-2b.think.vpc or tst-www-ancb-edu-au02-ap-southeast-2b.think.vpc or tst-www-billyblue-edu-au02-ap-southeast-2b.think.vpc or tst-www-catc-edu-au02-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-www-jni-edu-au02-ap-southeast-2b.think.vpc or tst-www-ssnt-edu-au02-ap-southeast-2b.think.vpc or tst-www-torrens-edu-au02-ap-southeast-2b.think.vpc or tst-www-think-edu-au02-ap-southeast-2b.think.vpc or tst-www-williamblue-edu-au02-ap-southeast-2b.think.vpc or tst-acnt.edu.au02-ap-southeast-2b.think.vpc or tst-ancb.edu.au02-ap-southeast-2b.think.vpc or tst-billyblue.edu.au-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-ssnt.edu.au02-ap-southeast-2b.think.vpc or tst-staff-test-think-edu-au01-ap-southeast-2b.think.vpc or tst-williamblue.edu.au-ap-southeast-2b.think.vpc or tst-b2cwp01-ap-southeast-2b.think.vpc or tst-frontier04-ap-southeast-2b.think.vpc or tst-phidu-torrens-edu-au-ap-southeast-2b.think.vpc or tst-campaigns01-ap-southeast-2b.think.vpc':
  - current

Steps to Reproduce Issue

Full error:

    _errors:
        - Rendering Primary Top file failed, render error:
          could not found expected ':'; line 80

          ---
          [...]
              - campaigns
            'tst-deltawp*':
              - s3cmd
              - deltawp
            # current b2c test servers.
            'tst-www-apm-edu-au02-ap-southeast-2b.think.vpc or tst-www-ancb-edu-au02-ap-southeast-2b.think.vpc or tst-www-billyblue-edu-au02-ap-southeast-2b.think.vpc or tst-www-catc-edu-au02-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-www-jni-edu-au02-ap-southeast-2b.think.vpc or tst-www-ssnt-edu-au02-ap-southeast-2b.think.vpc or tst-www-torrens-edu-au02-ap-southeast-2b.think.vpc or tst-www-think-edu-au02-ap-southeast-2b.think.vpc or tst-www-williamblue-edu-au02-ap-southeast-2b.think.vpc or tst-acnt.edu.au02-ap-southeast-2b.think.vpc or tst-ancb.edu.au02-ap-southeast-2b.think.vpc or tst-billyblue.edu.au-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-ssnt.edu.au02-ap-southeast-2b.think.vpc or tst-staff-test-think-edu-au01-ap-southeast-2b.think.vpc or tst-williamblue.edu.au-ap-southeast-2b.think.vpc or tst-b2cwp01-ap-southeast-2b.think.vpc or tst-frontier04-ap-southeast-2b.think.vpc or tst-phidu-torrens-edu-au-ap-southeast-2b.think.vpc or tst-campaign01-ap-southeast-2b.think.vpc':    <======================

Versions Report

Salt Version:
           Salt: 2015.8.8.2

Dependency Versions:
         Jinja2: 2.6
       M2Crypto: 0.21.1
           Mako: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
         Python: 2.7.3 (default, Dec 18 2014, 19:10:20)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.4
           cffi: Not Installed
       cherrypy: 3.2.2
       dateutil: 2.2
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
        libgit2: Not Installed
        libnacl: Not Installed
   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-gnupg: Not Installed
          smmap: 0.8.2
        timelib: Not Installed

System Versions:
           dist: Ubuntu 12.04 precise
        machine: x86_64
        release: 3.2.0-63-virtual
         system: Ubuntu 12.04 precise
@DaveQB
Copy link
Contributor Author

DaveQB commented May 20, 2016

I've split the line across 2 patterns and we are working.

eg

'some hostnames here':

  • current

'The other half of the hostname patterns':

  • current

@Ch3LL
Copy link
Contributor

Ch3LL commented May 20, 2016

@DaveQB i am able to replicate this. seems to be a limit of 1025 characters. Anything over that number and the sls renderer fails.

For example:

This works:

➜  ~ cat /srv/salt/pillar/issues/33389.sls
'tst-www-apm-edu-au02-ap-southeast-2b.think.vpc or tst-www-ancb-edu-au02-ap-southeast-2b.think.vpc or tst-www-billyblue-edu-au02-ap-southeast-2b.think.vpc or tst-www-catc-edu-au02-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-www-jni-edu-au02-ap-southeast-2b.think.vpc or tst-www-ssnt-edu-au02-ap-southeast-2b.think.vpc or tst-www-torrens-edu-au02-ap-southeast-2b.think.vpc or tst-www-think-edu-au02-ap-southeast-2b.think.vpc or tst-www-williamblue-edu-au02-ap-southeast-2b.think.vpc or tst-acnt.edu.au02-ap-southeast-2b.think.vpc or tst-ancb.edu.au02-ap-southeast-2b.think.vpc or tst-billyblue.edu.au-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-ssnt.edu.au02-ap-southeast-2b.think.vpc or tst-staff-test-think-edu-au01-ap-southeast-2b.think.vpc or tst-williamblue.edu.au-ap-southeast-2b.think.vpc or tst-b2cwp01-ap-southeast-2b.think.vpc or tst-frontier04-ap-southeast-2b.think.vpc or tst-phidu-torrens-edu-au-ap-southeast-2b.think.vpcjjjjjjjj':
  - current

But adding one more character does not:

➜  ~ cat /srv/salt/pillar/issues/33389.sls
'tst-www-apm-edu-au02-ap-southeast-2b.think.vpc or tst-www-ancb-edu-au02-ap-southeast-2b.think.vpc or tst-www-billyblue-edu-au02-ap-southeast-2b.think.vpc or tst-www-catc-edu-au02-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-www-jni-edu-au02-ap-southeast-2b.think.vpc or tst-www-ssnt-edu-au02-ap-southeast-2b.think.vpc or tst-www-torrens-edu-au02-ap-southeast-2b.think.vpc or tst-www-think-edu-au02-ap-southeast-2b.think.vpc or tst-www-williamblue-edu-au02-ap-southeast-2b.think.vpc or tst-acnt.edu.au02-ap-southeast-2b.think.vpc or tst-ancb.edu.au02-ap-southeast-2b.think.vpc or tst-billyblue.edu.au-ap-southeast-2b.think.vpc or tst-m-billyblue-edu-au-ap-southeast-2b.think.vpc or tst-ssnt.edu.au02-ap-southeast-2b.think.vpc or tst-staff-test-think-edu-au01-ap-southeast-2b.think.vpc or tst-williamblue.edu.au-ap-southeast-2b.think.vpc or tst-b2cwp01-ap-southeast-2b.think.vpc or tst-frontier04-ap-southeast-2b.think.vpc or tst-phidu-torrens-edu-au-ap-southeast-2b.think.vpcjjjjjjjjo':
  - current

I have verified this on 2015.5.9, 2015.8.8.2, and the head of 2016.3

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P4 Priority 4 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels May 20, 2016
@Ch3LL Ch3LL added this to the Approved milestone May 20, 2016
@Ch3LL Ch3LL added the Pillar label May 20, 2016
@DaveQB
Copy link
Contributor Author

DaveQB commented May 23, 2016

@Ch3LL
Cool. I am glad I wasn't reporting a false alarm.

@cachedout
Copy link
Contributor

Known issue in PyYAML:

http://pyyaml.org/browser/pyyaml/trunk/lib/yaml/scanner.py#L91

There is nothing we can do about this, really. I recommend we document this as a limitation of the anything parsed by YAML in Salt.

@rallytime
Copy link
Contributor

@cachedout and @DaveQB how does the doc addition in #33459 look?

@rallytime rallytime added fixed-pls-verify fix is linked, bug author to confirm fix TEAM Core labels May 23, 2016
@rallytime rallytime modified the milestones: C 9, Approved May 23, 2016
@rallytime rallytime self-assigned this May 23, 2016
@cachedout
Copy link
Contributor

It looks fine to me but let's also give @DaveQB a chance to respond before we just close this. :]

@DaveQB
Copy link
Contributor Author

DaveQB commented May 23, 2016

Cool. Sounds good. Good work @cachedout tracking back where the root cause for this issue lied.
Splitting my line over two lines and duplicating the pillars to apply worked out fine for me.

Thank you for the fast response and resolution.

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 Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P4 Priority 4 Pillar severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants