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

Spotlight resource does not verify metadata server is running #45

Closed
jazaval opened this Issue Feb 12, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jazaval
Copy link
Contributor

commented Feb 12, 2018

Spotlight resource assumes that the metadata server is running and hasn't been disabled with launchctl unload.

This requires a workaround of adding a launchd resource to start it and a small delay block to allow for it to finish spinning up before the spotlight resource is called:

launchd 'metadata server' do 
  path '/System/Library/LaunchDaemons/com.apple.metadata.mds.plist' 
  action :enable 
end 
 
ruby_block 'wait for metadata server spin-up' do 
  block { sleep 2 } 
end

spotlight '/' 

@jazaval jazaval added the bug label Feb 13, 2018

@jazaval jazaval self-assigned this Mar 23, 2018

jazaval added a commit that referenced this issue Aug 15, 2018

Fix for Issue #45: Spotlight resource does not verify metadata server…
… is running (#126)

* minor refactor

* split out the mdutil -s command for testability

* add additional functions that check that the server is disabled and a toggle function

* move MetadataUtil object outside the execute block so that it can be used by multiple execute blocks such as the new one used to enable the server

* modify the integration test to turn off the server as its first action

* update spec tests for the new possible state

* Responding to code review comments

- Removed the additional state in mdutil_possible_state
- Shift the mdutil output parsing to server_disabled
- Make mdutil_output a attr_reader so that we can now remove
  the volume parameter

* remove the excess parameter

* remove un-needed spec test for the additional possible state

@jazaval jazaval referenced this issue Aug 15, 2018

Merged

Release/2.4 #130

@mjmerin

This comment has been minimized.

Copy link
Member

commented Aug 17, 2018

Resolved in Release 2.4

@mjmerin mjmerin closed this Aug 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.