Giter Club home page Giter Club logo

Comments (7)

damacus avatar damacus commented on June 5, 2024

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.

jayhendren avatar jayhendren commented on June 5, 2024

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.

damacus avatar damacus commented on June 5, 2024

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.

jayhendren avatar jayhendren commented on June 5, 2024

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.

damacus avatar damacus commented on June 5, 2024

If we think we can get that working, and you and point me at that documentation! That'd be awesome.

from samba.

jayhendren avatar jayhendren commented on June 5, 2024

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:

from samba.

damacus avatar damacus commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.