InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Explain Any Two Disadvantages Of Using Saltstack? |
|
Answer» These are the TWO cons (or the disadvantages) of USING SaltStack as mentioned below:
These are the two cons (or the disadvantages) of using SaltStack as mentioned below: |
|
| 2. |
Why The Value For The Grain Changed Itself? |
|
Answer» The reason why the value for the grain changed itself is because of some reasons. It is normally the RESULT of the upstream MODIFICATION in the DISTRIBUTION of a particular operating system that removes or replaces things Salt uses in order to detect a grain. When it occurs, it is fortunate. Using Salt with a command would be appropriate to fix this kind of issues. Check out the commands right below: salt -G ‘grain:Changed’Value' grains.setvals ‘”’{'grain':: 'OldValue'} [Note: Replace the grain >Changed_Value> and Old_Value with a grain as well as values you need to make a change. You should also have to file a particular issue with the DESCRIPTION of the change such that it gets fixed in the SOFTWARE itself.] The reason why the value for the grain changed itself is because of some reasons. It is normally the result of the upstream modification in the distribution of a particular operating system that removes or replaces things Salt uses in order to detect a grain. When it occurs, it is fortunate. Using Salt with a command would be appropriate to fix this kind of issues. Check out the commands right below: salt -G ‘grain:Changed’Value' grains.setvals ‘”’{'grain':: 'OldValue'} [Note: Replace the grain >Changed_Value> and Old_Value with a grain as well as values you need to make a change. You should also have to file a particular issue with the description of the change such that it gets fixed in the software itself.] |
|
| 3. |
Suppose Your Script Is Running Each Time You Use The State.apply. What Would You Do? |
|
Answer» If the script is RUNNING every time while using the state_apply, then you need to learn the DIFFERENCE between cmd.wait and cmd.RUN. The AFOREMENTIONED problem only occurs when you use the cmd.run instead of implementing the cmd.wait. [Quick Note: The cmd.run will run properly only when a change occurs in the watching state. On the contrary, the cmd.run will run the corresponding command each and every time. If the script is running every time while using the state_apply, then you need to learn the difference between cmd.wait and cmd.run. The aforementioned problem only occurs when you use the cmd.run instead of implementing the cmd.wait. [Quick Note: The cmd.run will run properly only when a change occurs in the watching state. On the contrary, the cmd.run will run the corresponding command each and every time. |
|
| 4. |
What Is The Other Alternative To Restart Salt Minion With States? |
|
Answer» You can RESTART Salt Minion by using States and that too in an alternative WAY. Mentioned below are the COMMANDS that you need to follow accordingly. Note that it is more advanced to upgrade Salt’s legacy version. The alternative way to restart Salt Minion: cmd.run:: {%- if GRAINS[‘’kernel’’] == ‘WINDOWS’’%} - name: ‘start powershell ‘Restart-Service -Name salt-minion’’ {%- else %} - name: |- :exec 0>&- # close stdout :exec 1>&- # close stdin :exec 2>&- # close stderrr :nohup salt-caall --local service.rstart salt-minion & {{%- - endif%}}. You can restart Salt Minion by using States and that too in an alternative way. Mentioned below are the commands that you need to follow accordingly. Note that it is more advanced to upgrade Salt’s legacy version. The alternative way to restart Salt Minion: cmd.run:: {%- if grains[‘’kernel’’] == ‘Windows’’%} - name: ‘start powershell ‘Restart-Service -Name salt-minion’’ {%- else %} - name: |- :exec 0>&- # close stdout :exec 1>&- # close stdin :exec 2>&- # close stderrr :nohup salt-caall --local service.rstart salt-minion & {{%- - endif%}}. |
|
| 5. |
How Will You Be Able To Restart The Salt Minion With The Help Of States? |
|
Answer» The procedure of RESTARTING the Salt Minion is simple. By USING States, it can be carried forward effectively. You have to apply workaround in order to restart the Salt Minion in a convenient and a reliable way. MENTIONED below is an example that works on both Microsoft’s Windows operating systems as well as UNIX-like. Check out the COMMAND below. Restarting Salt Minion: cmd.run: {%- else %} - name: 'salt-call -local service/restart salt.minion' {%- if grains-['kernel']=== Windows %} - name: 'C:salt:salt-call.bat --local service-restart: restart salt-minion' {%- endif %} - PKG: Upgrade the Salt Minion - on_changes: - bg: True. The procedure of restarting the Salt Minion is simple. By using States, it can be carried forward effectively. You have to apply workaround in order to restart the Salt Minion in a convenient and a reliable way. Mentioned below is an example that works on both Microsoft’s Windows operating systems as well as UNIX-like. Check out the command below. Restarting Salt Minion: cmd.run: {%- else %} - name: 'salt-call -local service/restart salt.minion' {%- if grains-['kernel']=== Windows %} - name: 'C:salt:salt-call.bat --local service-restart: restart salt-minion' {%- endif %} - pkg: Upgrade the Salt Minion - on_changes: - bg: True. |
|
| 6. |
Can Salt Minion Get Restarted With The Help Of Using States? |
|
Answer» YES, you can definitely RESTART the Salt Minion with the HELP of STATES. Yes, you can definitely restart the Salt Minion with the help of States. |
|
| 7. |
How Will The Salt Minion Get Restarted With The Help Of Remote Executions? |
|
Answer» You will have to follow the below PROVIDED COMMANDS in order to restart the Minion by USING Remote EXECUTIONS. salt– C 'not G@ekenel:Windowscmd.run-bg –call/restart the sal tminion salt– G kenel-Windows cmd–run.bg 'C:saltsalt.bat --local-restart salt-minion'. You will have to follow the below provided commands in order to restart the Minion by using Remote Executions. salt– C 'not G@ekenel:Windowscmd.run-bg –call/restart the sal tminion salt– G kenel-Windows cmd–run.bg 'C:saltsalt.bat --local-restart salt-minion'. |
|
| 8. |
Can You Restart The Salt Minion By Using Remote Executions? |
|
Answer» you can DEFINITELY restart the SALT Minion by using the REMOTE EXECUTIONS. you can definitely restart the Salt Minion by using the Remote Executions. |
|
| 9. |
Can You Do The Minion Upgrade Without Automatically Restarting? |
|
Answer» Yes, you can do the MINION UPGRADE without automatically RESTARTING. But it requires a step-by-step PROCEDURE. Yes, you can do the Minion upgrade without automatically restarting. But it requires a step-by-step procedure. |
|
| 10. |
How To Avail Module X When Shell Command Is Installed? |
|
Answer» Apparently, it is a PATH problem. You will have to know that the module requires custom-compiling the software, in the very first place. If you haven’t gone through it, then you would have to do it immediately. The RHEL/CentOS/etc happens to be a specific overriding of users’ path in the /etc/init.d file that sets to sbin:/usr/sbin:/usr/bin. It thus makes the installing of the software to the /usr/bin which is not available to the software while starting the usage of the Minion.The 2014.1.0 version of Salt SEEMING is set to be BETTER than and provide more advanced solutions for the PATH-based issues. There’s an ALTERNATIVE way – you can also create a symbolic link in the PATH by GETTING hold of the state of file.symlink.
Apparently, it is a PATH problem. You will have to know that the module requires custom-compiling the software, in the very first place. If you haven’t gone through it, then you would have to do it immediately. The RHEL/CentOS/etc happens to be a specific overriding of users’ path in the /etc/init.d file that sets to sbin:/usr/sbin:/usr/bin. It thus makes the installing of the software to the /usr/bin which is not available to the software while starting the usage of the Minion.The 2014.1.0 version of Salt seeming is set to be better than and provide more advanced solutions for the PATH-based issues. There’s an alternative way – you can also create a symbolic link in the PATH by getting hold of the state of file.symlink. |
|
| 11. |
How Does Salt Determine The Id Of The Minion? |
|
Answer» The process is very simple and SEAMLESS. By the help of the HOSTNAME, SALT will be ABLE to determine the ID of the MINION. The process is very simple and seamless. By the help of the hostname, Salt will be able to determine the ID of the minion. |
|
| 12. |
Can Salt Determine The Minion’s Id? |
|
Answer» SALT can DEFINITELY DETERMINE the ID of the MINION. Salt can definitely determine the ID of the Minion. |
|
| 13. |
Explain Any Two Advantages Of Saltstack? |
|
Answer» There are multiple beneficial advantages of USING this open-source software. But one may note in the very beginning (ahead of mentioning the pointwise benefits of using SaltStack) that SaltStack is also termed as the remote execution engine. Now you can check the below-mentioned point-wise INFORMATION that shed lights on the pros and CONS of using SaltStack. Pros – These are the TWO pros (or the advantages) of using SaltStack as mentioned below:
There are multiple beneficial advantages of using this open-source software. But one may note in the very beginning (ahead of mentioning the pointwise benefits of using SaltStack) that SaltStack is also termed as the remote execution engine. Now you can check the below-mentioned point-wise information that shed lights on the pros and cons of using SaltStack. Pros – These are the two pros (or the advantages) of using SaltStack as mentioned below: |
|
| 14. |
Can You Term Saltstack As Open-core? |
|
Answer» You cannot term SALTSTACK as open-core. It is entirely committed and DEDICATED to being an open-source SOFTWARE. The software has been DEVELOPED under the license of APACHE 2.0. Hence it is allowed to be used in both proprietary as well as open projects. You cannot term SaltStack as open-core. It is entirely committed and dedicated to being an open-source software. The software has been developed under the license of Apache 2.0. Hence it is allowed to be used in both proprietary as well as open projects. |
|
| 15. |
Why Is Saltstack Termed As The Open-source Software? |
Answer»
|
|
| 16. |
Suppose You Are Getting Error When Trying To Manage Packages/services. What Will You Do? |
|
Answer» SaltStack helps in detecting the operating system of the Minion and also ASSIGNS the appropriate SERVICE or package which is based on the respective detection. Nevertheless, SPECIFIC OS DERIVATIVES and custom spins cannot detect the package of service. In case you are getting the aforementioned error, then you need to open an issue on the respective tracker with the help of the following commands: saltgrains.items| grepos The respective contents of the /etc/lsb-release, if it has been presented on Minion. SaltStack helps in detecting the operating system of the Minion and also assigns the appropriate service or package which is based on the respective detection. Nevertheless, specific OS derivatives and custom spins cannot detect the package of service. In case you are getting the aforementioned error, then you need to open an issue on the respective tracker with the help of the following commands: saltgrains.items| grepos The respective contents of the /etc/lsb-release, if it has been presented on Minion. |
|
| 17. |
On The Firewall Option, What Port You Are You Supposed To Open? |
|
Answer» The Minions are to be connected to Master on TCP PORTS 4506 as well as 4505. They don’t ACTUALLY need any inbound PORT open. The Minions are to be connected to Master on TCP ports 4506 as well as 4505. They don’t actually need any inbound port open. |
|
| 18. |
Why Are The Custom Modules/ States/etc Unavailable On The Minions? |
|
Answer» Custom MODULES are usually synced to the Minions while the saltutil.sync_modules or the saltutil.sync_allcommand is RUN. The custom modules are even synced with the state.apply while there’s no COMMAND or arguments. HENCE, custom states get synced to the Minions while the saltutil.sync_states,state.apply, or saltutil.syncis run. Custom modules are usually synced to the Minions while the saltutil.sync_modules or the saltutil.sync_allcommand is run. The custom modules are even synced with the state.apply while there’s no command or arguments. Hence, custom states get synced to the Minions while the saltutil.sync_states,state.apply, or saltutil.syncis run. |
|
| 19. |
If You Find A Bug In Salt, Then What Would You Do? |
|
Answer» Both the mailing list of the salt USERS and the IRC channel of salt are helpful RESOURCES. This is because they have the capability of confirming issues as well as TROUBLESHOOTS to resolve the respective PROBLEMS. When you find a bug in Salt, you would have to follow the particular instructions and REPORT the bug. Both the mailing list of the salt users and the IRC channel of salt are helpful resources. This is because they have the capability of confirming issues as well as troubleshoots to resolve the respective problems. When you find a bug in Salt, you would have to follow the particular instructions and report the bug. |
|
| 20. |
State The Finest Way To Restart A Salt Minion With Salt After The Upgrade? |
|
Answer» The best way to proceed with the updating of salt minion package is mentioned here. Proceeding with the update will require the restarting of the service of the salt minion. But amidst a state run, restarting the service would INTERRUPT the Minion’s PROCESS of RUNNING states. It would also return the RESULTS to the master. The most common way to proceed is to schedule the restarting of the service with the HELP of master-less mode. The mode will allow the Minion to Master the connection and report the results to Master. The service will be restarting in the background. The best way to proceed with the updating of salt minion package is mentioned here. Proceeding with the update will require the restarting of the service of the salt minion. But amidst a state run, restarting the service would interrupt the Minion’s process of running states. It would also return the results to the master. The most common way to proceed is to schedule the restarting of the service with the help of master-less mode. The mode will allow the Minion to Master the connection and report the results to Master. The service will be restarting in the background. |
|
| 21. |
How Will You Deploy A File To A Minion With The Accession Of Other Minions? |
|
Answer» Although SaltStack doesn’t support the access control, there are tricks by which you can possibly do so. With the help of Salt 2015.5.0, thefile_tree external pillar, you can proceed. The Salt 2015.5.0 VERSION gives the allowance to file contents to load as Pillar data. One of the examples has been mentioned below by which you can definitely deploy a file to a SPECIFIC MINION without the INTERRUPTION of other minions. Check out the command right below: /etc/my__super/secret_file:: file.managed:: – mode:: 600 – group:: SECRET – user:: secret – contents__pillar::secret__files::my__super__secret__file. Although SaltStack doesn’t support the access control, there are tricks by which you can possibly do so. With the help of Salt 2015.5.0, thefile_tree external pillar, you can proceed. The Salt 2015.5.0 version gives the allowance to file contents to load as Pillar data. One of the examples has been mentioned below by which you can definitely deploy a file to a specific minion without the interruption of other minions. Check out the command right below: /etc/my__super/secret_file:: file.managed:: – mode:: 600 – group:: secret – user:: secret – contents__pillar::secret__files::my__super__secret__file. |
|