Comments (7)
@memoryge can you please provide some example Chef code that replicates the behavior so that we can try replicating it on our end?
from autofs.
@ramereth I don't clear Chef code' s meaning. how can I get Chef code in my environment and then share to you?
from autofs.
@ramereth Execute command 'automount --timeout 42 /etc/auto.mnt01' . If this command executed correctly ,can function set_exp_timeout be invoked? if not which function is invoked to change expired time?
from autofs.
could you supply us with a full resource block for what you are trying to do, for example:
directory '/mnt/foo' do
recursive true
end
Also please let us know the Operating System in question and any other important steps to reproduce the issue
from autofs.
@ramereth @xorima
To reproduce the issue, we should have two computers, one act as a server, the other act as a client
OPERATIONS ON SERVER:
step 1 - install neccesarry software:
yum install nfs-utils rpcbind net-tools -y
result:install successfu
step 2 - create a shared folder, which will be accessed by client
mkdir -p /shared/{a,b}
result: after this operation, folders /shared/a and /shared/b are created
step 3 - edit shared folder's attribute
vim /etc/exports
edit this file, input contents like this:
/shared *(rw,sync,no_root_squash)
step 4 - shutdown firewall,ensure that other computers can visit this server conveniently.
systemctl stop firewalld
result:input command "systemctl status firewalld", if we get the result contains "Active: inactive (dead)...",that we shutdown the firewall successfully.
step 5 - restart rpcbind and nfs
systemctl restart rpcbind
systemctl restart nfs
result:input commands "systemctl status rpcbind" and "systemctl status nfs",we can see the services's running staus are active
step 6 - query the server's op address
ip a
result: we can get the servers ip address, in my environment the server's ip address is 172.168.130.72.
step 7 - query the status of shared folder
showmount -e localhost
result:we get the result like:
Export list for localhost:
/shared *
ABOVE IS ALL CONFIGURATIONS ON THE SERVER.
OPERATIONS ON CLIENT:
step 1 - install neccesarry software:
yum install nfs-utils rpcbind autofs -y
result: install seccessful
step 2 - edit file auto.master to add a mount item
vim /etc/auto.maser
the last line of file auto.master is "+auto.master",we add contents "/mnt01 /etc/auto.mnt01" after this line. so finally the file like this:
+auto.master
/mnt01 /etc/auto.mnt01
step 3 - create and edit mount rule file
vim /etc/auto.mnt01
in fine auto.mnt01 we add content like this:
nfs -rw,soft,intr 172.168.130.72:/shared
remarks:ip address 172.168.130.72 is the server's ip
step 4 - shutdown fire wall
systemctl stop firewalld
step 5 - restart autofs
systemctl restart autofs
result:after this operation, configurations on client become effectife
step 6 - visit remote shared folder
cd /mnt01/nfs
result:we can visit the remote server's shared folders a and b in path /mnt01/nfs, and when we query mount information use command "df -h", we can see the filesystem "172.168.130.72:/shared" in the list.
step 7 - test expire
cd ../..
this operation is to exit visite of remote shared folder. In config file /etc/autofs.conf, itme "timeout = 300", means if we stop visit the remote shared folder, after 5 minutes(300 secondes), the folder "/mnt/nfs" will be unmounted automatically. That is correct.
step 8 - change the expire time of /mnt01/nfs
automount --timeout 30 /etc/auto.mnt01
this operation will change /mnt01/nfs folder's expire time from 5 minutes(300 secondes) to 30 seconds, that means if we exit visit /mnt01/nfs after 30 seconds the folder "/mnt01/nfs" will be unmounted automatically, but it is not. expire time is still 300 seconds.That means configration "automount --timeout 30 /etc/auto.mnt01" is invalid.
remark: when wait the deadline of unmount don't execute command "df -h". If you need to watch if the mount or unmount was triggered ,you can start a gdb and attach to the "automount --foreground --dont-check-daemon" process. When mount or unmount event happens,gdb will output a information like "[Detaching after fork from child process xxxxxxx]"
from autofs.
@xorima @ramereth
I do the same operations as above in new environments, in this new environment server is a fedroa 5.3.11-100.fc29.aarch64 machine, and client is a fedora 5.6.13-100.fc30.aarch64 machine. So the issue can aslo be reproduced on fedora environment
from autofs.
So it appears that there is some confusion here, this repository is for the Chef Cookbook called autofs
it is not support for autofs on the system itself. For actual support in your issue I would recommend starting here: https://help.ubuntu.com/community/Autofs
Closing as not related to this repo.
from autofs.
Related Issues (17)
- no constraints set in metadata
- No resource or method named `declared_type=' for `Chef::Resource::AutomasterEntry ""' HOT 8
- Chef13 Resource warnings HOT 17
- Refactor to new custom resource model HOT 2
- Dependency issue with 'resource' HOT 1
- Custom entries in auto.master HOT 4
- line version requirement is out of date HOT 3
- map_entry resource does not work with Chef 14
- New release to supermarket HOT 2
- Sous-Chefs Cookbook setup
- cookbook fails to compile resource HOT 2
- Creating multiple entry in auto.master file for single automaster_entry '/-' HOT 5
- autofs Chef 17 compatability
- mount_point doesn't correctly default to resource name HOT 1
- Dependency Dashboard
- changing nfs export location results in duplicate entries HOT 1
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 autofs.