Hide Forgot
Description of problem: We've discussed this with Ian, and the work's already in progress, but we wanted to formalize a request: <snip> Even though I don't yet have an RFE for this I have done some preliminary evaluation of the request. Unfortunately for me the way I would like to do it will add an unacceptable amount of complexity for insufficient benefit. That means 2 things. First, I'll need to do this within the existing browse framework in autofs. While not ideal from my POV I don't have any choice and initial investigation indicates the change is fairly straight forward doing it within the existing browse framework. Second, I will not be able to implement the amd "fullybrowsable" option for amd format maps in autofs for the foreseeable future. AFAICS that option has limited use apart from perhaps amd map debugging, also Richard doesn't need this functionality, so that shouldn't be a problem. Being that it looked fairly straight forward the investigation resulted in an initial partial implementation ... I have a start to that already but considering your environment I see another problem that I'll need to fix. I'm thinking about how to do that as well as contributing to the autofs discussion. It will be necessary to check that the amd map format support will function acceptably without the additional fix. </snip> This will require implementation and client validation for their map setup. Version-Release number of selected component (if applicable): RHEL7 autofs Additional info: This request came out of a discussion with Ian Kent and the client, so there's a bit of history on it.
Created attachment 1191452 [details] Patch - fix short memory allocation in lookup_amd_instance()
Created attachment 1191453 [details] Patch - fix count_mounts() function
Created attachment 1191454 [details] Patch - fix argc off by one in mount_autofs.c
Created attachment 1191455 [details] Patch - add ref counting to struct map_source
Created attachment 1191456 [details] Patch - add support for amd browsable option
Created attachment 1191458 [details] Patch - add ref counting to struct map_source (updated) Fix patch description.
An initial test package with the above changes has been built. It is located at: http://people.redhat.com/ikent/autofs-5.0.7-56.bz1367576.2.el7/ We need to test there are not side effects of this change and that the change works ok in the customer environment since the scale of the customer environment is large. I can help QE with test development for verification of the required functionality.
(In reply to Frank Hirtz from comment #0) > ... > I have a start to that already but considering your environment I see another > problem that I'll need to fix. I'm thinking about how to do that as well as > contributing to the autofs discussion. The problem that I was referring to above is related to the frequent map reuse that is common in amd map configurations. Given the size of the maps that will be used here the lack of map reuse would have been a significant problem but I believe it is addressed by the patch that adds reference counting to the top level map source structure. We will need to see if this is sufficient and watch out for side effects of this particular change.
Created attachment 1196135 [details] Patch - fix typos in README.amd-maps
Created attachment 1196136 [details] Patch - add support for amd browsable option (updated) Add documentation and man page changes.
Created attachment 1196137 [details] Patch - add function conf_amd_get_map_name()
Created attachment 1196138 [details] Patch - add function conf_amd_get_mount_paths()
Created attachment 1196139 [details] Patch - include amd mount section mounts in master mounts list
An updated test package with the above changes has been built. It is located at: http://people.redhat.com/ikent/autofs-5.0.7-56.bz1367576.3.el7/ This package adds the ability of autofs to use top level amd mount sections of the autofs configuration instead of requiring an additional master map entry. Please give this a try and let us know how it goes.
Created attachment 1196643 [details] Patch - add support for amd browsable option (update 2) Remove debug log statement.
Created attachment 1196644 [details] Patch - include amd mount section mounts in master mounts list (updated) Fix CHANGELOG text.
Created attachment 1196645 [details] Patch - check for conflicting amd section mounts
An updated test package with the above changes has been built. It is located at: http://people.redhat.com/ikent/autofs-5.0.7-56.bz1367576.4.el7/ This package adds a check for amd section mounts that conflict with entries in the master map and includes a couple of other minor updates to existing patches. It would be good if this package could be tested, I need to know if this functions in the customer environment and to find out what else I need to fix.
Created attachment 1197821 [details] Patch - add function conf_amd_get_map_name() (updated) - fix typo in patch description.
Created attachment 1197822 [details] Patch - add function conf_amd_get_mount_paths() (updated) - fix initialization mistake in conf_enumerate_amd_mount_sections().
Created attachment 1197823 [details] Patch - check for conflicting amd section mounts (updated) - fix path not applied. - update patch to check for existing amd master map entry and not issue message.
Created attachment 1197824 [details] Patch - add function conf_get_map_options()
Created attachment 1197825 [details] Patch - capture cache option and its settings during parsing
Created attachment 1197826 [details] Patch - handle map_option cache for top level mounts
Created attachment 1197827 [details] Patch - handle amd cache option all in amd type auto mounts
An updated test package with the above changes has been built. It is located at: http://people.redhat.com/ikent/autofs-5.0.7-56.bz1367576.5.el7/ Changes since revision 4: - fix typo in description of add function conf_amd_get_map_name() patch. - fix initialization mistake in conf_enumerate_amd_mount_sections(). - fix patch not applied and update check for existing amd master map entry. - add handling of amd cache option for top level and type auto mounts. Please test this build.
Adding pm_ack to this and placing it on the RHEL 7.4 Filesystems and Storage RPL
As far as I know moving forward with this bug depends on feedback from the latest autofs test package per https://bugzilla.redhat.com/show_bug.cgi?id=1367576#c29
Created attachment 1263609 [details] Patch - fix _strncmp() usage
Created attachment 1263610 [details] Patch - add function conf_amd_get_map_name() Changed function name from conf_get_map_name() to conf_amd_get_map_name().
Created attachment 1263611 [details] Patch - add function conf_amd_get_map_options() Oops, actually the function name change was in this patch. conf_get_map_options() -> conf_amd_get_map_options()
Created attachment 1263612 [details] Patch - handle map_option cache for top level mounts (updated) And this patch changed to use the conf_amd_get_get_map_options().
Created attachment 1263614 [details] Patch - fix bogus check in expire_cleanup() Dependency patch.
Created attachment 1263615 [details] Patch - delay submount exit for amd submounts
Created attachment 1266812 [details] Patch - use autofs_point to store expire timeout where possibe Almost missed this patch which was partly completed. It is needed to properly support the "utimeout" option of amd type "auto" submounts.
Created attachment 1267442 [details] Patch - fix possible NULL derefernce Covarity identified fix.
Created attachment 1273487 [details] Patch - fix invalid reference in remount_active_mount() Fix a mistake found in testing when getting the expire timeout at startup when re-connecting to existing mounts.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2213