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

Ephemeral IP in export file #72

Open
rmalenko opened this issue Feb 26, 2020 · 6 comments
Open

Ephemeral IP in export file #72

rmalenko opened this issue Feb 26, 2020 · 6 comments

Comments

@rmalenko
Copy link

I had a test server with IP 1.1.1.1, then I removed this IP everywhere in manifests, even restart NFS server, like windows :)
But this IP appears again in export 1.1.1.1, like this

/nfs_server     2.2.2.2(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)
/nfs_server     1.1.1.1

Could you prompt me where I could look for to resolve , please?

@rmalenko rmalenko changed the title Ephemer IP in export Ephemeral IP in export file Feb 26, 2020
@raphink
Copy link
Contributor

raphink commented Mar 5, 2020

I'm guessing you mean you had a nfs::export resource, and removed it from your code and it didn't remove it. Is that correct?

@rmalenko
Copy link
Author

rmalenko commented Mar 5, 2020

Yes, sorry for non-exhaustive information

This IP was absent

  include nfs::server
  $exportdir  = '/backup'
  nfs::export { 'clickhouse':
    ensure  => absent,
    guest   => '111.111.111.111',
    share   => $exportdir,
    options => 'rw,fsid=0,insecure,no_subtree_check,async,no_root_squash',
  }
...

however, I see it in export file like this

/backup     22.22.22.22(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)
/backup     111.111.111.111

@raphink
Copy link
Contributor

raphink commented Mar 5, 2020

Can you check the following please?

grep concat::fragment $(puppet config print statedir)/resources.txt

@rmalenko
Copy link
Author

rmalenko commented Mar 5, 2020

Yes, of course. Empty result.

This command on puppet agent gives:
cat /opt/puppetlabs/puppet/cache/state/resources.txt | grep 'concat'
concat_file[/etc/exports]

on puppet server

concat_file[/etc/ssh/sshd_config]
concat_file[/etc/apache2/ports.conf]
concat_file[15-default.conf]
concat_file[15-default-ssl.conf]
concat_file[25-infra-puppet.conf]
concat_file[25-files-puppet.conf]

@raphink
Copy link
Contributor

raphink commented Mar 5, 2020

The Puppet server's resources.txt relates to its agent, so it's irrelevant to this issue.

The fragment is not listed on the agent so it should be removed from the file. Do you see anything related to /etc/exports in a Puppet agent log with --debug?

@rmalenko
Copy link
Author

rmalenko commented Mar 5, 2020

Here are debug output

Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/notify: notify to Exec[reload_nfs_srv]
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/Concat_file[/etc/exports]/before: before to File[/etc/exports]
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/Concat_file[/etc/exports]: Skipping automatic relationship with File[/etc/exports]
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]: Adding autorequire relationship with User[root]
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]: Adding autorequire relationship with Group[root]
Debug: Executing: 'diff -u /etc/exports /tmp/puppet-file20200305-17118-njmgqk'
Notice: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]/content: 
--- /etc/exports	2020-03-05 14:34:41.911790955 +0300
Info: Computing checksum on file /etc/exports
Info: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]: Filebucketed /etc/exports to puppet with sum c0d0dbfd5a1e4849ca4c1d89f4e031a4
Debug: Executing: 'diff -u /etc/exports /tmp/puppet-file20200305-17118-5mgzp8'
Notice: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]/content: 
Notice: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]/content: content changed '{md5}c0d0dbfd5a1e4849ca4c1d89f4e031a4' to '{md5}1e6f28048ead3caae0d250cdf3192ee9' (corrective)
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]: The container Concat[/etc/exports] will propagate my refresh event
Debug: /Stage[main]/Nfs::Server::Debian/Concat[/etc/exports]/File[/etc/exports]: The container /etc/exports will propagate my refresh event
Debug: /etc/exports: The container Concat[/etc/exports] will propagate my refresh event
Debug: Concat[/etc/exports]: The container Class[Nfs::Server::Debian] will propagate my refresh event
Info: Concat[/etc/exports]: Scheduling refresh of Exec[reload_nfs_srv]
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif:   Process: 8459 ExecReload=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]: exportfs: /etc/exports [6]: Neither 'subtree_check' or 'no_subtree_check' specified for export "1.1.1.1:/backup_nfs_server".
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]:   Assuming default behaviour ('no_subtree_check').
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]:   NOTE: this default has changed since nfs-utils version 1.0.x
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]: exportfs: incompatible duplicated export entries:
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]: exportfs:         1.1.1.1:/backup_nfs_server (0x425) [IGNORED]
Debug: /Stage[main]/Nfs::Server::Debian/Exec[reload_nfs_srv]/onlyif: Mar 05 14:26:24 backup exportfs[7849]: exportfs:         1.1.1.1:/backup_nfs_server (0x2432)
nfs::export { 'ch-02':
    ensure  => present,
    guest   => '1.1.1.1',
    share   => $exportdir,
    options => 'rw,fsid=0,insecure,no_subtree_check,async,no_root_squash',
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants