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

Another exception that is caused by a syntax error #7905

Closed
thedrow opened this issue Oct 17, 2013 · 20 comments
Closed

Another exception that is caused by a syntax error #7905

thedrow opened this issue Oct 17, 2013 · 20 comments
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix

Comments

@thedrow
Copy link
Contributor

thedrow commented Oct 17, 2013

This is with the latest develop branch.

[default] Configuring cache buckets...
[default] Running provisioner: salt...
Copying salt minion config to vm.
Checking if salt-minion is installed
salt-minion found
Checking if salt-call is installed
salt-call found
Using Bootstrap Options:  -c /tmp -C
Salt binaries found. Configuring only.
stdin: is not a tty
 *  INFO:  sh -- Version 1.5.8
 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   3.2.0-23-generic
 *  INFO:   Distribution: Ubuntu 12.04

 *  INFO: Configuring minion
 *  INFO: Found function install_ubuntu_deps
 *  INFO: Found function config_salt
 *  INFO: Found function install_ubuntu_stable
 *  INFO: Found function install_ubuntu_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Running config_salt()
 *  INFO: Running install_ubuntu_restart_daemons()
salt-minion stop/waiting
salt-minion start/running, process 7443
 *  INFO: Running daemons_running()
 *  INFO: Salt configured
Salt successfully configured!
Calling state.highstate... (this may take a while)
stdin: is not a tty
[DEBUG   ] Reading configuration from /etc/salt/minion
[INFO    ] Using cached minion ID: precise64
[DEBUG   ] loading log_handlers in ['/var/cache/salt/minion/extmods/log_handlers', '/usr/lib/python2.7/dist-packages/salt/log/handlers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/log_handlers, it is not a directory
[DEBUG   ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG   ] Configuration file path: /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.7/dist-packages/salt/grains']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.7/dist-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[DEBUG   ] loading pillar in ['/var/cache/salt/minion/extmods/pillar', '/usr/lib/python2.7/dist-packages/salt/pillar']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/pillar, it is not a directory
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading returner in ['/var/cache/salt/minion/extmods/returners', '/usr/lib/python2.7/dist-packages/salt/returners']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/returners, it is not a directory
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] loading states in ['/var/cache/salt/minion/extmods/states', '/usr/lib/python2.7/dist-packages/salt/states']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/states, it is not a directory
[DEBUG   ] Loaded saltmod as virtual salt
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.7/dist-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[INFO    ] Executing command 'ps -efH' in directory '/root'
[DEBUG   ] output: UID        PID  PPID  C STIME TTY          TIME CMD
root         2     0  0 07:57 ?        00:00:00 [kthreadd]
root         3     2  0 07:57 ?        00:00:00   [ksoftirqd/0]
root         6     2  0 07:57 ?        00:00:00   [migration/0]
root         7     2  0 07:57 ?        00:00:00   [watchdog/0]
root         8     2  0 07:57 ?        00:00:00   [migration/1]
root        10     2  0 07:57 ?        00:00:00   [ksoftirqd/1]
root        12     2  0 07:57 ?        00:00:00   [watchdog/1]
root        13     2  0 07:57 ?        00:00:00   [cpuset]
root        14     2  0 07:57 ?        00:00:00   [khelper]
root        15     2  0 07:57 ?        00:00:00   [kdevtmpfs]
root        16     2  0 07:57 ?        00:00:00   [netns]
root        17     2  0 07:57 ?        00:00:00   [kworker/u:1]
root        18     2  0 07:57 ?        00:00:00   [sync_supers]
root        19     2  0 07:57 ?        00:00:00   [bdi-default]
root        20     2  0 07:57 ?        00:00:00   [kintegrityd]
root        21     2  0 07:57 ?        00:00:00   [kblockd]
root        22     2  0 07:57 ?        00:00:00   [ata_sff]
root        23     2  0 07:57 ?        00:00:00   [khubd]
root        24     2  0 07:57 ?        00:00:00   [md]
root        25     2  0 07:57 ?        00:00:00   [kworker/1:1]
root        26     2  0 07:57 ?        00:00:00   [khungtaskd]
root        27     2  0 07:57 ?        00:00:00   [kswapd0]
root        28     2  0 07:57 ?        00:00:00   [ksmd]
root        29     2  0 07:57 ?        00:00:00   [fsnotify_mark]
root        30     2  0 07:57 ?        00:00:00   [ecryptfs-kthrea]
root        31     2  0 07:57 ?        00:00:00   [crypto]
root        39     2  0 07:57 ?        00:00:00   [kthrotld]
root        40     2  0 07:57 ?        00:00:00   [kworker/u:2]
root        41     2  0 07:57 ?        00:00:00   [scsi_eh_0]
root        42     2  0 07:57 ?        00:00:00   [scsi_eh_1]
root        43     2  0 07:57 ?        00:00:00   [scsi_eh_2]
root        47     2  0 07:57 ?        00:00:00   [kworker/1:2]
root        66     2  0 07:57 ?        00:00:00   [devfreq_wq]
root       191     2  0 07:57 ?        00:00:00   [kdmflush]
root       204     2  0 07:57 ?        00:00:00   [kdmflush]
root       212     2  0 07:57 ?        00:00:00   [jbd2/dm-0-8]
root       213     2  0 07:57 ?        00:00:00   [ext4-dio-unwrit]
root       395     2  0 07:58 ?        00:00:00   [iprt]
root       425     2  0 07:58 ?        00:00:00   [kpsmoused]
root       485     2  0 07:58 ?        00:00:00   [rpciod]
root       569     2  0 07:58 ?        00:00:00   [nfsiod]
root       936     2  0 07:58 ?        00:00:00   [flush-252:0]
root      1250     2  0 08:03 ?        00:00:02   [kworker/0:2]
root      5654     2  0 08:08 ?        00:00:00   [kworker/1:0]
root      5706     2  0 08:13 ?        00:00:01   [kworker/0:1]
root      6106     2  0 08:18 ?        00:00:00   [kworker/0:0]
root         1     0  0 07:57 ?        00:00:01 /sbin/init
root       298     1  0 07:58 ?        00:00:00   upstart-udev-bridge --daemon
root       301     1  0 07:58 ?        00:00:00   /sbin/udevd --daemon
root       363   301  0 07:58 ?        00:00:00     /sbin/udevd --daemon
root       364   301  0 07:58 ?        00:00:00     /sbin/udevd --daemon
102        519     1  0 07:58 ?        00:00:00   dbus-daemon --system --fork --activation=upstart
syslog     557     1  0 07:58 ?        00:00:00   rsyslogd -c5
root       565     1  0 07:58 ?        00:00:00   dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -1 eth0
root       588     1  0 07:58 ?        00:00:00   rpc.idmapd
root       593     1  0 07:58 ?        00:00:00   /usr/sbin/sshd -D
root      7219   593  0 08:21 ?        00:00:00     sshd: vagrant [priv]
vagrant   7236  7219  1 08:21 ?        00:00:00       sshd: vagrant@notty 
root      7529  7236  0 08:21 ?        00:00:00         sudo -H bash -l
root      7530  7529  0 08:21 ?        00:00:00           bash -l
root      7532  7530 60 08:21 ?        00:00:00             /usr/bin/python /usr/bin/salt-call state.highstate -l debug
root      7556  7532  0 08:21 ?        00:00:00               ps -efH
root       643     1  0 07:58 ?        00:00:00   rpcbind -w
statd      704     1  0 07:58 ?        00:00:00   rpc.statd -L
root       737     1  0 07:58 ?        00:00:00   upstart-socket-bridge --daemon
root       768     1  0 07:58 tty4     00:00:00   /sbin/getty -8 38400 tty4
root       773     1  0 07:58 tty5     00:00:00   /sbin/getty -8 38400 tty5
root       781     1  0 07:58 tty2     00:00:00   /sbin/getty -8 38400 tty2
root       782     1  0 07:58 tty3     00:00:00   /sbin/getty -8 38400 tty3
root       786     1  0 07:58 tty6     00:00:00   /sbin/getty -8 38400 tty6
root       793     1  0 07:58 ?        00:00:00   cron
daemon     794     1  0 07:58 ?        00:00:00   atd
root       798     1  0 07:58 ?        00:00:00   /usr/sbin/irqbalance
root       866     1  0 07:58 ?        00:00:01   /usr/sbin/VBoxService
root       930     1  0 07:58 ?        00:00:00   dhclient eth0
root       932     1  0 07:58 tty1     00:00:00   /sbin/getty -8 38400 tty1
ntp       1162     1  0 07:58 ?        00:00:00   /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 103:108
root      7443     1  3 08:21 ?        00:00:00   /usr/bin/python /usr/bin/salt-minion
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.7/dist-packages/salt/grains']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.7/dist-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[DEBUG   ] loading pillar in ['/var/cache/salt/minion/extmods/pillar', '/usr/lib/python2.7/dist-packages/salt/pillar']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/pillar, it is not a directory
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading states in ['/var/cache/salt/minion/extmods/states', '/usr/lib/python2.7/dist-packages/salt/states']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/states, it is not a directory
[DEBUG   ] Loaded saltmod as virtual salt
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.7/dist-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Jinja search path: '['/srv/salt']'
[DEBUG   ] Rendered data from file: /srv/salt/top.sls:
base:
  '*':
    - users
    - git
    - python
    - dev-linux-toolchain
[DEBUG   ] Results of YAML rendering: 
OrderedDict([('base', OrderedDict([('*', ['users', 'git', 'python', 'dev-linux-toolchain'])]))])
[DEBUG   ] Syncing all
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_modules'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_states'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_grains'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_renderers'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_returners'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[DEBUG   ] Local cache dir: '/var/cache/salt/minion/files/base/_outputters'
[DEBUG   ] MinionEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_56c02c9f39234bae85c5910942f731ec_pub.ipc
[DEBUG   ] MinionEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_56c02c9f39234bae85c5910942f731ec_pull.ipc
[DEBUG   ] Refreshing modules...
[INFO    ] Loading fresh modules for state activity
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.7/dist-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded apt as virtual pkg
[DEBUG   ] Loaded upstart as virtual service
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading states in ['/var/cache/salt/minion/extmods/states', '/usr/lib/python2.7/dist-packages/salt/states']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/states, it is not a directory
[DEBUG   ] Loaded saltmod as virtual salt
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.7/dist-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[DEBUG   ] MinionEvent PUB socket URI: ipc:///var/run/salt/minion/minion_event_56c02c9f39234bae85c5910942f731ec_pub.ipc
[DEBUG   ] MinionEvent PULL socket URI: ipc:///var/run/salt/minion/minion_event_56c02c9f39234bae85c5910942f731ec_pull.ipc
[DEBUG   ] Jinja search path: '['/srv/salt']'
[DEBUG   ] Rendered data from file: /srv/salt/users/init.sls:
users:
  user.present:
    - name: alon
[DEBUG   ] Results of YAML rendering: 
OrderedDict([('users', OrderedDict([('user.present', [OrderedDict([('name', 'alon')])])]))])
[DEBUG   ] Jinja search path: '['/srv/salt']'
[DEBUG   ] Rendered data from file: /srv/salt/git/init.sls:
git:
  pkg.installed
[DEBUG   ] Results of YAML rendering: 
OrderedDict([('git', 'pkg.installed')])
[DEBUG   ] Jinja search path: '['/srv/salt']'
[DEBUG   ] Rendered data from file: /srv/salt/python/init.sls:
python:
  pkg.installed:
    - names:
      - python2.7
      - python3

setuptools:
  file.managed:
    - source: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
    - name: /usr/local/sbin/ez_setup.py
    - source_hash: md5=1f38ac7740e810d9fca1b8661b596fd4
    - require:
      - pkg: python

  cmd.run:
    - name: /usr/bin/python /usr/local/sbin/ez_setup.py
    - unless: which easy_install
    - require:
      - pkg: python
      - file: /usr/local/sbin/ez_setup.py

pip:
  file.managed:
    - name: /usr/local/sbin/get-pip.py
    - source: https://raw.github.com/pypa/pip/master/contrib/get-pip.py
    - source_hash: md5=60a3d165e93999895e26b96681b65090
    - require:
      - pkg: python
      - cmd: setuptools

  cmd.run:
    - name: /usr/bin/python /usr/local/sbin/get-pip.py
    - unless: which pip
    - require:
      - pkg: python
      - file: /usr/local/sbin/get-pip.py
    - reload_modules: True

virtualenv:
  pip.installed:
    - name: virtualenv
    - bin_env: /usr/local/
    - require:
      - cmd: pip

virtualenvwrapper:
  pip.installed:
    - name: virtualenvwrapper
    - bin_env: /usr/local/
    - require:
      - pip: virtualenv
      - cmd: pip

  /home/alon/.virtualenvs:
    file.directory:
    - makedirs: True
    - recurse: True
    - user: alon
    - require:
      - pip: virtualenvwrapper

  file.managed:
    - name: /home/alon/.bashrc
    - user: alon
    - require:
      - file: /home/alon/

#  file.append:
#    - name: /home/alon/.bashrc
#    - text:
#      - export WORKON_HOME=$HOME/.virtualenvs
#      - export PROJECT_HOME=$HOME/Documents/Projects
#      - export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
#      - source /usr/local/bin/virtualenvwrapper_lazy.sh
[DEBUG   ] Results of YAML rendering: 
OrderedDict([('python', OrderedDict([('pkg.installed', [OrderedDict([('names', ['python2.7', 'python3'])])])])), ('setuptools', OrderedDict([('file.managed', [OrderedDict([('source', 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py')]), OrderedDict([('name', '/usr/local/sbin/ez_setup.py')]), OrderedDict([('source_hash', 'md5=1f38ac7740e810d9fca1b8661b596fd4')]), OrderedDict([('require', [OrderedDict([('pkg', 'python')])])])]), ('cmd.run', [OrderedDict([('name', '/usr/bin/python /usr/local/sbin/ez_setup.py')]), OrderedDict([('unless', 'which easy_install')]), OrderedDict([('require', [OrderedDict([('pkg', 'python')]), OrderedDict([('file', '/usr/local/sbin/ez_setup.py')])])])])])), ('pip', OrderedDict([('file.managed', [OrderedDict([('name', '/usr/local/sbin/get-pip.py')]), OrderedDict([('source', 'https://raw.github.com/pypa/pip/master/contrib/get-pip.py')]), OrderedDict([('source_hash', 'md5=60a3d165e93999895e26b96681b65090')]), OrderedDict([('require', [OrderedDict([('pkg', 'python')]), OrderedDict([('cmd', 'setuptools')])])])]), ('cmd.run', [OrderedDict([('name', '/usr/bin/python /usr/local/sbin/get-pip.py')]), OrderedDict([('unless', 'which pip')]), OrderedDict([('require', [OrderedDict([('pkg', 'python')]), OrderedDict([('file', '/usr/local/sbin/get-pip.py')])])]), OrderedDict([('reload_modules', True)])])])), ('virtualenv', OrderedDict([('pip.installed', [OrderedDict([('name', 'virtualenv')]), OrderedDict([('bin_env', '/usr/local/')]), OrderedDict([('require', [OrderedDict([('cmd', 'pip')])])])])])), ('virtualenvwrapper', OrderedDict([('pip.installed', [OrderedDict([('name', 'virtualenvwrapper')]), OrderedDict([('bin_env', '/usr/local/')]), OrderedDict([('require', [OrderedDict([('pip', 'virtualenv')]), OrderedDict([('cmd', 'pip')])])])]), ('/home/alon/.virtualenvs', OrderedDict([('file.directory', [OrderedDict([('makedirs', True)]), OrderedDict([('recurse', True)]), OrderedDict([('user', 'alon')]), OrderedDict([('require', [OrderedDict([('pip', 'virtualenvwrapper')])])])])])), ('file.managed', [OrderedDict([('name', '/home/alon/.bashrc')]), OrderedDict([('user', 'alon')]), OrderedDict([('require', [OrderedDict([('file', '/home/alon/')])])])])]))])
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
AttributeError: 'OrderedDict' object has no attribute 'append'
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 77, in salt_call
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 308, in run
    caller.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 137, in run
    ret = self.call()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 78, in call
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 257, in highstate
    force=kwargs.get('force', False)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2304, in call_highstate
    high, errors = self.render_highstate(matches)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2204, in render_highstate
    state, errors = self.render_state(sls, env, mods, matches)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2046, in render_state
    self._handle_iorder(state)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2076, in _handle_iorder
    state[name][s_dec].append(
AttributeError: 'OrderedDict' object has no attribute 'append'
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 77, in salt_call
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 308, in run
    caller.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 137, in run
    ret = self.call()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 78, in call
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 257, in highstate
    force=kwargs.get('force', False)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2304, in call_highstate
    high, errors = self.render_highstate(matches)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2204, in render_highstate
    state, errors = self.render_state(sls, env, mods, matches)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2046, in render_state
    self._handle_iorder(state)
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2076, in _handle_iorder
    state[name][s_dec].append(
AttributeError: 'OrderedDict' object has no attribute 'append'
@thedrow
Copy link
Contributor Author

thedrow commented Oct 17, 2013

I'm not sure if this is the case here but the exception might also be raised due to a missing -.

@basepi
Copy link
Contributor

basepi commented Oct 18, 2013

A missing dash where?

Also, we could use salt --versions-report and info on the systems and states you're using. (Actually, I guess the rendered states are in the log above -- still, the original states might be useful.)

@thedrow
Copy link
Contributor Author

thedrow commented Oct 19, 2013

some-type:
  pkg.installed"
    pkgs: <---- here for example
      - pkg1

@thedrow
Copy link
Contributor Author

thedrow commented Oct 20, 2013

@basepi

vagrant@precise64:~$ salt --versions-report
Salt: 0.17.0-1350-g045c241
Python: 2.7.3 (default, Sep 26 2013, 20:03:06)
Jinja2: 2.6
M2Crypto: 0.21.1
msgpack-python: 0.1.10
msgpack-pure: Not Installed
pycrypto: 2.4.1
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.2

@basepi
Copy link
Contributor

basepi commented Oct 21, 2013

Ah, yes, that's almost certainly the issue. We just need to catch that and log a more useful error. Thanks for the report!

@cachedout
Copy link
Contributor

@thedrow I suspect your issue may have been solved by the recent commit by @regilero. Could you pull the latest develop and try again? With the state that you posted I now get a ScannerError exception which shows the location of the syntax problem.

@s0undt3ch
Copy link
Collaborator

:todo: Add testcase to confirm #8174 fix. Assigned to me for the test case.

@regilero
Copy link
Contributor

@s0undt3ch I think here the error is coming from /home/alon/.virtualenvs:

I made a test for that:

# C should fail with bad list error message
B:
  # ok
  file.exist:
    - name: /foo/bar/foobar
# ok
/foo/bar/foobar:
  file.exist
# nok
C:
  /foo/bar/foobar:
    file.exist

I wrote an integration test for that (and the #8174 issue, in fact), but I cannot make it running with ./tests/runtests.py -n integration.shell.call -vv until I put it inside an existing def method. Is there something special to do to get a def test_xxx method in call.py running?

@holmboe
Copy link
Contributor

holmboe commented Oct 31, 2013

I don't know the answer but could it be a stale .pyc file perhaps?

@regilero
Copy link
Contributor

mmmh, made a silly typo, I'll push a the tests soon

regilero added a commit to regilero/salt that referenced this issue Oct 31, 2013
@thedrow
Copy link
Contributor Author

thedrow commented Oct 31, 2013

I'll verify that this works tomorrow.

@thedrow
Copy link
Contributor Author

thedrow commented Nov 3, 2013

It reports the error, however the error message is incorrect.

    Data failed to compile:
----------
    Rendering SLS postgres failed, render error: while scanning a simple key
  in "<unicode string>", line 8, column 7:
          postgresql-9.3
          ^
could not found expected ':'
  in "<unicode string>", line 9, column 7:
          - pgadmin3
          ^
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1959, in render_state
    rendered_sls=mods
  File "/usr/lib/python2.7/dist-packages/salt/template.py", line 69, in compile_template
    ret = render(input_data, env, sls, **render_kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/renderers/yaml.py", line 34, in render
    data = load(yaml_data, Loader=get_yaml_loader(argline))
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 111, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 115, in check_token
    while self.need_more_tokens():
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 149, in need_more_tokens
    self.stale_possible_simple_keys()
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 289, in stale_possible_simple_keys
    "could not found expected ':'", self.get_mark())
ScannerError: while scanning a simple key
  in "<unicode string>", line 8, column 7:
          postgresql-9.3
          ^
could not found expected ':'
  in "<unicode string>", line 9, column 7:
          - pgadmin3
          ^

The parser shouldn't expect a ':' after a missing '-'.

@regilero
Copy link
Contributor

regilero commented Nov 3, 2013

@thedrow: could you post your sls file containing the postgresql-9.3/- pgadmin3 syntax error?

@thedrow
Copy link
Contributor Author

thedrow commented Nov 3, 2013

@regilero Sure, I'll do so by the end of the day :)

@thedrow
Copy link
Contributor Author

thedrow commented Nov 3, 2013

Oh nevermind it's already open so there you go:

postgres:
  pkgrepo.managed:
    - name: deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main
    - key_url: http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc

  pkg.installed:
    - pkgs:
      postgresql-9.3
      - pgadmin3

@regilero
Copy link
Contributor

regilero commented Nov 3, 2013

Made some tests. This is quite unrelated with previous syntax error. This is a yaml render bad syntax detection, which is catched, so maybe not even a bug.

The problem is there are two missing spaces before postgresql-9.3, so this is not a yaml-valid file.

# syntax ok
A:
  file.exists:
    - name:
        foo
# syntax not ok
A:
  file.exists:
    - name:
      bar

@thedrow
Copy link
Contributor Author

thedrow commented Nov 4, 2013

So while it doesn't crash it won't report the error correctly. Can you take it upstream if possible?
I'm closing this as it seems that the exception is not raised.

@basepi
Copy link
Contributor

basepi commented Nov 4, 2013

What do you mean by "take it upstream if possible"? We will cherry-pick this fix for 0.17.2, if that's what you mean.

@basepi basepi closed this as completed Nov 4, 2013
@thedrow
Copy link
Contributor Author

thedrow commented Nov 5, 2013

Oh I thought you meant the yaml parser. If the problem is with your yaml renderer (stateconf) I'll file another issue about this.

@regilero
Copy link
Contributor

regilero commented Nov 5, 2013

@thedrow: if you are unhappy with the pyyaml output message for theses missing spaces, then it's an issue for pyyaml project.

ScannerError: while scanning a simple key
  in "", line 8, column 7:
          postgresql-9.3
          ^
could not found expected ':'
  in "", line 9, column 7:
          - pgadmin3

But it ias maybe a valid pyyaml message, as it is parsing your postgresql-9.3 as a key, and expect a ':' after that. Previous key in the list, for the parser was 'pkgs:' and is maybe just a simple null value key.

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 fixed-pls-verify fix is linked, bug author to confirm fix
Projects
None yet
Development

No branches or pull requests

6 participants