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

Unable to manage file: 'module' object has no attribute 'TEMPFILE_PREFIX'` #43111

Closed
Sieabah opened this issue Aug 22, 2017 · 10 comments
Closed
Labels
info-needed waiting for more info
Milestone

Comments

@Sieabah
Copy link

Sieabah commented Aug 22, 2017

Description of Issue/Question

[salt.state       ][ERROR   ][1290] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1733, in call
    else:
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1652, in wrapper with salt.utils.context.func_globals_inject(f, **inject_globals):
File "/usr/lib/python2.7/dist-packages/salt/states/file.py", line 3366, in comment
    __salt__['file.comment_line'](name, regex, char, True, backup)
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 1160, in comment_line
    temp_file = _mkstemp_copy(path=path, preserve_inode=False)
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 1289, in _mkstemp_copy
    temp_file = salt.utils.mkstemp(prefix=salt.utils.files.TEMPFILE_PREFIX)
AttributeError: 'module' object has no attribute 'TEMPFILE_PREFIX'

[ERROR ][1290] Unable to manage file: 'module' object has no attribute 'TEMPFILE_PREFIX'

This was working until just recently, even with the patch version mismatch.

Steps to Reproduce Issue

Minion tries to highstate by itself and fails, manual intervention with sudo salt-call state.highstate works just fine.

Versions Report

Salt-Master: Salt: 2016.3.3
Salt-Minions: Salt: 2016.3.7

@gtmanfred
Copy link
Contributor

I believe that this was fixed, but I am not sure where.

It is worth noting that 2016.3 is in CVE release only, so we won't be releasing any bug fix patches for it.

Would you be able to update your master and minions to at least 2016.11 and see if the problem is fixed?

Also, your master should never be on an older release than the minion. https://docs.saltstack.com/en/latest/faq.html#can-i-run-different-versions-of-salt-on-my-master-and-minion

Thanks,
Daniel

@gtmanfred gtmanfred added the info-needed waiting for more info label Aug 22, 2017
@gtmanfred gtmanfred added this to the Blocked milestone Aug 22, 2017
@Sieabah
Copy link
Author

Sieabah commented Aug 22, 2017

It seems the latest available for Ubuntu 14.04 is 2016.3.7, I'll try to see if I can get the 2016.11 release deployed.

@gtmanfred
Copy link
Contributor

We host our own packages

http://repo.saltstack.com/#ubuntu

There is an ubuntu tab on that page that will point you to the official repos for salt.

@Sieabah
Copy link
Author

Sieabah commented Aug 22, 2017

It seems upgrading has solved the issue, weird bug between using 2016.11 (master) and 2016.3 (minion) that caused the minion unable to high state or use the package manager at all. But both are now at 2016.11.

@gtmanfred
Copy link
Contributor

Hrm, if you have that error message, I would appreciate it, because we should be gauranteeing master -> minion backwards compatibility, where you can have a newer master with an older minion.

Thanks,
Daniel

@Sieabah
Copy link
Author

Sieabah commented Aug 22, 2017

2016-10-27 19:04:07,794 [salt.cli.daemons ][INFO    ][3212] The Salt Minion is starting up
2016-10-27 19:04:07,794 [salt.minion      ][INFO    ][3212] Minion is starting as user 'root'
2016-10-27 19:04:07,795 [salt.utils.event ][INFO    ][3212] Starting pull socket on /var/run/salt/minion/minion_event_80a001ab8b_pull.ipc
2016-10-27 19:04:35,074 [salt.utils.parsers][WARNING ][3212] Minion received a SIGTERM. Exiting.
2016-10-27 19:04:35,074 [salt.cli.daemons ][INFO    ][3212] The salt minion is shutting down..
2016-10-27 19:04:35,074 [salt.cli.daemons ][INFO    ][3212] The Salt Minion is shut down

@gtmanfred
Copy link
Contributor

gtmanfred commented Aug 22, 2017 via email

@Sieabah
Copy link
Author

Sieabah commented Aug 23, 2017

I unfortunately don't have the master and minion in a state where it throws it anymore, but for testing purposes it was 2016.11 for the master and 2016.3.3 for the minion.

@gtmanfred
Copy link
Contributor

gtmanfred commented Aug 23, 2017 via email

@gtmanfred
Copy link
Contributor

Unfortunately I was unable to replace this :/

I am going to close this issue, if someone else reproduces it, please comment and I will re open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed waiting for more info
Projects
None yet
Development

No branches or pull requests

2 participants