saltstack / saltstack/salt

salt grain.setvals returned strings with u'

Open
#56,147 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Core Grains severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

I am trying to set grains on minion. the minion is configured with:

master: salt-master
id: 3efcf9be-6b7e-434d-a5d6-9a2ad0701e78
user: root
sudo_user: root

When I do set grains then it results in u'val pattern

Steps to Reproduce Issue

Just add any minion with above minion config.

Versions Report
[root@299b213d992e /]# salt --versions-report
Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: unknown
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  7 2019, 00:51:29)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.7.1908 Core
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 4.19.76-linuxkit
         system: Linux
        version: CentOS Linux 7.7.1908 Core

Result:
Screenshot 2020-02-13 at 3 20 35 AM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the grain.setvals behavior with the minion configuration and Salt 2019.2.0 details provided in the issue, then inspect where the returned grain values are formatted. Done means setting grains no longer produces values containing the u' pattern and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.