{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/35330","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/35330/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/35330/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/35330/events","html_url":"https://github.com/saltstack/salt/issues/35330","id":170327515,"number":35330,"title":"pkgin not detected as pkg provider on SmartOS","user":{"login":"nigelsnapsecurity","id":5930974,"avatar_url":"https://avatars.githubusercontent.com/u/5930974?v=3","gravatar_id":"","url":"https://api.github.com/users/nigelsnapsecurity","html_url":"https://github.com/nigelsnapsecurity","followers_url":"https://api.github.com/users/nigelsnapsecurity/followers","following_url":"https://api.github.com/users/nigelsnapsecurity/following{/other_user}","gists_url":"https://api.github.com/users/nigelsnapsecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/nigelsnapsecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigelsnapsecurity/subscriptions","organizations_url":"https://api.github.com/users/nigelsnapsecurity/orgs","repos_url":"https://api.github.com/users/nigelsnapsecurity/repos","events_url":"https://api.github.com/users/nigelsnapsecurity/events{/privacy}","received_events_url":"https://api.github.com/users/nigelsnapsecurity/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":522,"closed_issues":979,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-08-10T18:18:07Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-08-10T04:52:37Z","updated_at":"2016-08-10T19:24:55Z","closed_at":null,"body":"### pkgin is not detected as pkg provider on SmartOS\r\nAfter forcing the selection in the minion configuration as described ([here](https://docs.saltstack.com/en/latest/ref/modules/index.html#module-provider-override)) the pkg installation (squid using the [squid formula](https://github.com/saltstack-formulas/squid-formula/blob/master/squid/init.sls)) worked fine.\r\n\r\nSalt master and minion were installed using pkgin to install python modules that were available and then using pip to install salt.\r\n\r\n### Setup\r\n(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)\r\nUsing the salt-formula for squid with the following added to the map.jinja\r\n```\r\n    'SmartOS': {\r\n        'pkgs': ['squid'],\r\n        'service': ['squid'],\r\n        'conf_dir': '/opt/local/etc/squid',\r\n        'conf_file': 'squid.conf',\r\n        'cache': '/var/squid/cache',\r\n     },\r\n```\r\n\r\n`uname -a` is `SunOS configmaster0 5.11 joyent_20160616T055400Z i86pc i386 i86pc Solaris`\r\n\r\nbase image is *SmartOS base-multiarch 16.2.0*.  Image uuid is `9fb3cf88-49a0-11e6-8407-0be269553017` from images.joyent.com.\r\n\r\n```\r\n[root@configmaster0 /data/salt]# salt 'a46af0c8-2c46-c493-a8f2-f14a27492279' grains.items\r\na46af0c8-2c46-c493-a8f2-f14a27492279:\r\n    ----------\r\n    cpu_flags:\r\n        - rdseed\r\n        - adx\r\n        - avx2\r\n        - fma\r\n        - bmi2\r\n        - bmi1\r\n        - rdrand\r\n        - f16c\r\n        - vmx\r\n        - avx\r\n        - xsave\r\n        - pclmulqdq\r\n        - aes\r\n        - movbe\r\n        - sse4.2\r\n        - sse4.1\r\n        - ssse3\r\n        - popcnt\r\n        - tscp\r\n        - cx16\r\n        - sse3\r\n        - sse2\r\n        - sse\r\n        - fxsr\r\n        - mmx\r\n        - cmov\r\n        - amd_sysc\r\n        - cx8\r\n        - tsc\r\n        - fpu\r\n    cpu_model:\r\n        Intel(r) Xeon(r) CPU D-1540 @ 2.00GHz\r\n    cpuarch:\r\n        amd64\r\n    datacenter:\r\n        ca-east-3\r\n    dns:\r\n        ----------\r\n        domain:\r\n        ip4_nameservers:\r\n            - 8.8.8.8\r\n            - 8.8.4.4\r\n            - 172.28.0.5\r\n        ip6_nameservers:\r\n        nameservers:\r\n            - 8.8.8.8\r\n            - 8.8.4.4\r\n            - 172.28.0.5\r\n        search:\r\n            - local\r\n    domain:\r\n    fqdn:\r\n        configmaster0\r\n    fqdn_ip4:\r\n    fqdn_ip6:\r\n    gid:\r\n        0\r\n    gpus:\r\n    groupname:\r\n        root\r\n    host:\r\n        configmaster0\r\n    hwaddr_interfaces:\r\n        ----------\r\n        net0:\r\n            02:00:00:45:92:8e\r\n        net1:\r\n            90:b8:d0:51:58:3d\r\n        net2:\r\n            90:b8:d0:1d:fc:7b\r\n    hypervisor_uuid:\r\n        00000000-0000-0000-0000-0cc47a7b58f8\r\n    id:\r\n        a46af0c8-2c46-c493-a8f2-f14a27492279\r\n    imageversion:\r\n        base-multiarch 16.2.0\r\n    ip4_interfaces:\r\n        ----------\r\n        lo0:\r\n            - 127.0.0.1\r\n        net0:\r\n            - 172.28.206.23\r\n        net1:\r\n            - 172.28.2.4\r\n        net2:\r\n            - 172.28.0.60\r\n    ip6_interfaces:\r\n        ----------\r\n        lo0:\r\n            - ::1\r\n        net0:\r\n        net1:\r\n        net2:\r\n    ip_interfaces:\r\n        ----------\r\n        lo0:\r\n            - 127.0.0.1\r\n            - ::1\r\n        net0:\r\n            - 172.28.206.23\r\n        net1:\r\n            - 172.28.2.4\r\n        net2:\r\n            - 172.28.0.60\r\n    ipv4:\r\n        - 127.0.0.1\r\n        - 172.28.206.23\r\n        - 172.28.0.60\r\n        - 172.28.2.4\r\n    ipv6:\r\n        - ::1\r\n    kernel:\r\n        SunOS\r\n    kernelrelease:\r\n        5.11\r\n    locale_info:\r\n        ----------\r\n        defaultencoding:\r\n            None\r\n        defaultlanguage:\r\n            None\r\n        detectedencoding:\r\n            ascii\r\n    localhost:\r\n        configmaster0\r\n    master:\r\n        172.28.2.4\r\n    mdata:\r\n        ----------\r\n        test:\r\n            123\r\n    mem_total:\r\n        512\r\n    nodename:\r\n        configmaster0\r\n    num_cpus:\r\n        16\r\n    num_gpus:\r\n        0\r\n    os:\r\n        SmartOS\r\n    os_family:\r\n        Solaris\r\n    osarch:\r\n        amd64\r\n    osfinger:\r\n        SmartOS-20160616T055400Z\r\n    osfullname:\r\n        SmartOS\r\n    osmajorrelease:\r\n        20160616T055400Z\r\n    osrelease:\r\n        20160616T055400Z\r\n    osrelease_info:\r\n        - 20160616T055400Z\r\n    path:\r\n        /usr/sbin:/usr/bin:/bin:/sbin:/usr/local/bin\r\n    pid:\r\n        27149\r\n    pkgsrcpath:\r\n        http://pkgsrc.joyent.com/packages/SmartOS/2016Q2/multiarch/All\r\n    pkgsrcversion:\r\n        2016Q2\r\n    ps:\r\n        /usr/ucb/ps auxwww\r\n    pythonexecutable:\r\n        /opt/local/bin/python2.7\r\n    pythonpath:\r\n        - /opt/local/bin\r\n        - /opt/local/lib/python27.zip\r\n        - /opt/local/lib/python2.7\r\n        - /opt/local/lib/python2.7/plat-sunos5\r\n        - /opt/local/lib/python2.7/lib-tk\r\n        - /opt/local/lib/python2.7/lib-old\r\n        - /opt/local/lib/python2.7/lib-dynload\r\n        - /opt/local/lib/python2.7/site-packages\r\n    pythonversion:\r\n        - 2\r\n        - 7\r\n        - 11\r\n        - final\r\n        - 0\r\n    saltpath:\r\n        /opt/local/lib/python2.7/site-packages/salt\r\n    saltversion:\r\n        2016.3.2\r\n    saltversioninfo:\r\n        - 2016\r\n        - 3\r\n        - 2\r\n        - 0\r\n    server_id:\r\n        1478084492\r\n    shell:\r\n        /bin/sh\r\n    uid:\r\n        0\r\n    username:\r\n        root\r\n    virtual:\r\n        zone\r\n    zmqversion:\r\n        4.1.4\r\n    zoneid:\r\n        4063\r\n    zonename:\r\n        a46af0c8-2c46-c493-a8f2-f14a27492279\r\n```\r\n\r\n### Steps to Reproduce Issue\r\n(Include debug logs if possible and relevant.)\r\nThe output of the failure to the console on highstate.  I do not currently have debug logs showing this.  I will post these tomorrow if required.\r\n\r\n```\r\n          ID: squid_pkgs\r\n    Function: pkg.installed\r\n      Result: False\r\n     Comment: State 'pkg.installed' was not found in SLS 'squid'\r\n              Reason: 'pkg' __virtual__ returned False\r\n     Started:\r\n    Duration:\r\n     Changes:\r\n```\r\n\r\n\r\n### Versions Report\r\nMaster and Minion are the same vm and are using the same pip installed salt as described above.\r\n\r\n```\r\nSalt Version:\r\n           Salt: 2016.3.2\r\n\r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: Not Installed\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n         Jinja2: 2.7.3\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: 0.22\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.11 (default, Jul  2 2016, 00:22:45)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.3.0\r\n           RAET: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n        Tornado: 4.4.1\r\n            ZMQ: 4.1.4\r\n\r\nSystem Versions:\r\n           dist:\r\n        machine: i86pc\r\n        release: 5.11\r\n         system: SunOS\r\n        version: Not Installed\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/238976133","html_url":"https://github.com/saltstack/salt/issues/35330#issuecomment-238976133","issue_url":"https://api.github.com/repos/saltstack/salt/issues/35330","id":238976133,"user":{"login":"sjorge","id":379665,"avatar_url":"https://avatars.githubusercontent.com/u/379665?v=3","gravatar_id":"","url":"https://api.github.com/users/sjorge","html_url":"https://github.com/sjorge","followers_url":"https://api.github.com/users/sjorge/followers","following_url":"https://api.github.com/users/sjorge/following{/other_user}","gists_url":"https://api.github.com/users/sjorge/gists{/gist_id}","starred_url":"https://api.github.com/users/sjorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjorge/subscriptions","organizations_url":"https://api.github.com/users/sjorge/orgs","repos_url":"https://api.github.com/users/sjorge/repos","events_url":"https://api.github.com/users/sjorge/events{/privacy}","received_events_url":"https://api.github.com/users/sjorge/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T19:24:55Z","updated_at":"2016-08-10T19:24:55Z","body":"It work with a pip installation (I run a few of those). As long as it can find the pkgin binary.\r\n\r\nWhat does the following return:\r\n```bash\r\npfexec salt-call cmd.run 'which pkgin'\r\n```\r\n\r\nFor me it finds pkgin in /opt/local\r\n```yaml\r\nlocal:\r\n    /opt/local/bin/pkgin\r\n```\r\n\r\nI do know it doesn't work in the global zone, unless you install the special repo and set the proper path in the minion's smf."}}
{"actor":{"display_login":"sjorge"}}