Comments (7)
I suspect this is to do with the accumulator pattern.it sounds like something earlier on in the run is altering the share resource. Then the last share isn't getting a chance to be added to the collection.
This is strictly the correct behaviour. Though that doesn't mean desired!
I would suggest putting the samba server and the share resource together so they fail together, and don't alter the file.
If that doesn't work, or I'm completely off the mark here. Let me know and we cna further dig into this problem.
from samba.
Yes, this seems to be a common problem in community cookbooks that use the accumulator pattern.
I believe your suggestion...
...putting the samba server and the share resource together so they fail together, and don't alter the file.
... will work in my particular case. At least, it fixed the issue in the quick-and-dirty testing that I've been doing. However, it doesn't work in all cases. When the accumulated resources are spread out across multiple cookbooks, it becomes impossible to group them together - I ran into this issue with the firewall cookbook, for instance.
from samba.
Yeah we really don't like using the accumulator pattern, but are usually forced into it when there is no conf.d directory for the software.
Technically, I'm not sure there's a lot we can do apart from the above suggestion of keeping together resources. Especially if in between those resources you have things that are likely to fail.
from samba.
smb.conf supports an include
directive, so maybe creating a samba.conf.d directory would work even if it's not the default or typical configuration file layout for samba? Just kind of spitballing here - switching to that pattern would obviously be an enormous design change from the current cookbook.
from samba.
If we think we can get that working, and you and point me at that documentation! That'd be awesome.
from samba.
Well it may be a moot point. Turns out smb.conf does not support wildcard includes, only a single file at a time. So even with includes, it would probably be necessary to use an accumulator to build the list of files to include.
References:
- https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html (section "include (S)")
- https://serverfault.com/a/649619/213070
from samba.
Do we think this is possible to do, or it should be documented it isn't recommended to structure the resources in the way you're doing?
from samba.
Related Issues (20)
- Dangerfile should use failure instead of fail HOT 1
- Remove .rubocop.yml with Dangerfile HOT 2
- Update Changelog HOT 1
- Run latest cookstyle HOT 2
- Update builds to be parallel HOT 2
- Samba - Chef 17 Compatability HOT 1
- Dependency Dashboard
- samba Chef-13 HOT 1
- Move to using Poise-Service HOT 1
- Creating a samba user resets the user password if the user already exists. HOT 10
- Samba Server Options Error HOT 3
- nmb restart failed HOT 3
- Allow for existing users HOT 1
- Chef version 12.15 needed due to undefined method `delayed_action' HOT 6
- Unable to use computer after password overwritten HOT 4
- Samba client package OpenSUSE HOT 1
- bind_interfaces_only does nothing in samba_server resource HOT 2
- sssd-libwbclient is needed on RHEL/CentOS 7.5+ systems HOT 5
- log level isn't actually used anywhere HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samba.