vscode-extension-for-zowe icon indicating copy to clipboard operation
vscode-extension-for-zowe copied to clipboard

ZOWE Explorer 2.0.0 stops working when opening a workspace in Windows mounted using z/OS NFS

Open cybersorcerer opened this issue 2 years ago • 14 comments

Hi,

i upgraded ZOWE Explorer, ZOWE CLI and IBM Z Open Editor to the new Versions (ZOWE Explorer 2.0.0, ZOWE CLI 7.0.2, IBM Z Open Editor 2.0.2). When i open a VS Code Workspace on my local hard drive, everything works fine. As you can see from the following screen shot, ZOWE Explorer is open in the sidebar and an assembler source file (coming from a workspace from my local harddrive) is in VS Code and IBM Z Open Editor is doing it's job (as you can see from the entries in the menu).

image

But my usual workflow is different. The git repositories are located inside z/Unix, i mount the required directories using the Windows NFS Client to my desktop PC. I use make together with some simple VS Code tasks definitions (zowe cli zos-ssh) for CI/CD. When i open a VS Code Workspave or Folder from the NFS share the following happens:

  1. A windows pops up with the following error message: "Error encountered while activating and initializing logger! Error: EBUSY: resource busy or locked, realpath 'y:\hlasm\RUVZS-ApplicationManagementInfrastructure'" The path is the NFS Share
  2. ZOWE Explorer looses all profiles
  3. IBM Z Open Editor stops working

Have a look at the screenshot below. The ZOWE Explorer view on the left side is empty (i.e no profiles). The popup in the editor does not have the Goto Definitions, Goto References anymore. In addition (not on the screen shot). The outline is empty which is another indication that IBM Z Open Editor did stop working as well. I assume this is because ZOWE hast lost its profiles.

image

This all worked without any problems for at least 2 years with the previous version of zowe cli, zowe explorer and IBM Z Open Editor. In order to fix this and get ZOWE Explorer to work again i have to do the following:

  1. Close the folder
  2. Open a folder from the local hard drive
  3. Restart VS Code

Steps to reproduce the behavior:

  1. Mount a z/Unix directory using the Windows NFS Client, here is the mount command i am using: mount -o mtype=hard \\mvst.ruv.de\hfw\u\xv880aj\Documents\source,text y:
  2. Open a Folder located on the share
  3. Open a source code file from the folder or workspace just opened
  4. Go back to the ZOWE Explorer Icon
  5. The Profiles should be gone.

Sometimes the error message does not pop up. In this case you need to exit out of VS Code without closing the editor and restart it to see the error message.

  • OS: MS Windows 10 Build 19044.1645
  • Zowe Explorer Version: 2.0.0
  • (Optional) Zowe CLI Version: 7.0.2
  • IBM Z Open Editor 2.0.2
  • VS Code Version: 1.66.2

I checked the zowe.log. The last message in the log is:

[2022/04/29 06:59:12.698] [ERROR] [extension.js:32] Error encountered while activating and initializing logger! {"errno":-4082,"syscall":"realpath","code":"EBUSY","path":"y:\hlasm\RUVZS-ApplicationManagementInfrastructure"} <

Nothing after this line anymore until i fix the problem. This could be a timing related problem with NFS Shares. The device is not busy as indicated in the error message i can edit the file and save it to the share without any issues.

ZOWE Explorer 2.0.0 has to work with NFS mounted shares without any problems as it did before.

regards

Ronny

cybersorcerer avatar Apr 29 '22 05:04 cybersorcerer

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.

github-actions[bot] avatar Apr 29 '22 05:04 github-actions[bot]

Hi, some additional info for you. When i do work on files on my NFS Share and try to save them, i get the following error: Command 'zopeneditor.hlasm.truncate' not found and the file is not saved to the NFS Share.

image

When i then select the ZOWE EXPLORER Icon at the sidebar and try to save again, the error message goes away and the file is saved to the NFS Share.

image

The next change and save will fail again with the same error and so on.

regards Ronny

cybersorcerer avatar May 06 '22 16:05 cybersorcerer

@cybersorcerer if possible can we see the output upon running the showattr command against the z/OS server you used when this issue ocurred for you?

example: showattr -e myhost

rudyflores avatar May 11 '22 19:05 rudyflores

@rudyflores i tried but unfortunately our version of the windows showattr command does not have the -e option. PS C:\Users\XV880AJ> showattr -e mvst GFSA950E Unknown option 'e'. GFSA972I usage: C:\Users\XV880AJ\zosnfs\showattr.exe [-t?] [--norpcbind] HOST [MOUNTPOINT] [--usage] [--version] We are on z/OS 2.4, here is the output of showattr --version showattr --version GFSA961I showattr (z/OS NFS utilities) 2.4, Aug 7 2019 16:35:05 Licensed Materials - Property of IBM "Restricted Materials of IBM" 5650-ZOS Copyright IBM Corp. 1991, 2019 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Copyright SUN Microsystems, Inc & Electronic Data Systems Corp. 1988, 1989

regards Ronny

cybersorcerer avatar May 12 '22 04:05 cybersorcerer

Hello,

any news on this?

Thx in advance

Ronny

cybersorcerer avatar Jun 01 '22 14:06 cybersorcerer

hey @cybersorcerer, Thanks for your patience. I'm getting setup to replicate an environment similar to yours. I'll reach out as soon as I have some good news 😋

zFernand0 avatar Jun 10 '22 11:06 zFernand0

Hey @cybersorcerer, Tested on Win 10 (19044.1708) with a NFS share created on WSL2. I'm still able to use the Zowe Explorer extension with profiles loaded from the zowe.config.json file I'm no expert with NFS Shares, but I couldn't reproduce the EBUSY error even when the file was technically in use on the host image

zFernand0 avatar Jun 13 '22 14:06 zFernand0

Hey @zFernand0,

NFS inside WSL is for sure not the same as a z/OS NFS Server. You should recreate the Environment using a z/OS NFS Server,the Windows NFS Client with the extensions to the Windows mount command as described in my first post. I hope you do have access to a z/OS System.

Regards

Ronny

cybersorcerer avatar Jun 13 '22 15:06 cybersorcerer

Hi,

Are there any news?

Regards Ronny

cybersorcerer avatar Jul 22 '22 04:07 cybersorcerer

Hey @cybersorcerer It would be great if we could have a chat on Slack 😋 https://join.slack.com/t/openmainframeproject/shared_invite/zt-1e1p0elcm-F0s4L9CSSr3eGNke3pBtrQ

zFernand0 avatar Aug 11 '22 14:08 zFernand0

@zFernand0 i joined and i am on slack now

cybersorcerer avatar Aug 29 '22 04:08 cybersorcerer

Hi,

Any news?

Regards Ronny

cybersorcerer avatar Nov 20 '22 13:11 cybersorcerer

Hi Guys,

Still no news? Thats a bit underwhelming

Greetings

Ronny

cybersorcerer avatar Dec 03 '22 12:12 cybersorcerer

Hey @cybersorcerer, My apologies for not delivering timely responses. I will ask for help from other team members as I alone cannot seem to get to the bottom of this issue. Thank you for being patient. I will reply here as soon as I am able to progress further. Again, sorry for the delay on this. :cry:

zFernand0 avatar Dec 03 '22 22:12 zFernand0

Hi guys,

I had hopes that somehow this really annoying bug would go away with new releases. Unfortunately it did not go away but something changed after the installation of ZOWE Explorer 2.7.0. It still does not work and the symptoms i described are still the same but with 2.7.0 i now see an error message popup. Look at the following screenshot:

image

When i click on the Show Config button, no config us shown i.e the click doesn't do anything and as described before all targets are gone. I really hope somebody starts looking into this!

Regards Ronny

cybersorcerer avatar Mar 29 '23 06:03 cybersorcerer

hey @cybersorcerer, Could you share the following files?

  • any zowe.config.json available
  • any zowe.schema.json available
  • the <path-to>/.zowe/settings/imperative.json (where <path-to> is ~, $home, or $ZOWE_CLI_HOME)

Note: Don't forget to remove sensitive information. 😋

zFernand0 avatar Mar 29 '23 12:03 zFernand0

Ok, here is the doc you requested. There is only one zowe.config.json and zowe.schema.json which i have attached. There is NO imperative.json, neither in $HOME nor in $ZOWE_CLI_HOME. I do not know why you are requesting those files. The files you requested seem completely unrelateted to the error i reported! Why don't you ask for logs or the like? The popup only occurs when i work on z/OS NFS Shares! When i open projects on my local windows harddrive and go the the ZOWE Explorer everything works, no popup, no errors! All i have reported so far is related to projects opend on windows drives mapped to a z/OS NFS SHARE! I suggest you read thru the whole thing again to make sure you understand the problem! I am getting a bit angry, this took far to long and it looks to me i keep getting "keep the customer busy" questions! Maybe you should talk to project members a bit more experianced with z/OS and z/Unix.

doc.zip

cybersorcerer avatar Mar 30 '23 04:03 cybersorcerer

Hey @cybersorcerer, I can imagine how frustrating this must be for you. Personally, I would be frustrated as well if the community support I received was not helping to get towards a resolution. And for that I want to apologize.

Why don't you ask for logs or the like?

I was hesitant that the logs would not have been very helpful given the unique environment and that we (Zowe Explorer) may not have been surfacing most errors appropriately and no debug messages were being captured (until this Pull Request that is)

There is NO imperative.json, neither in $HOME nor in $ZOWE_CLI_HOME. I do not know why you are requesting those files. The files you requested seem completely unrelateted to the error i reported!

Thanks for sharing. The reason for me asking about these files is because the Zowe Explorer extension needs to be able to write/touch all three at different stages of the initialization process. (see details in ProfileUtils) And seeing the message you shared regarding Zowe Explorer having troubles loading your Zowe config, (introduced recently as well) tells me that this is likely a client-side issue (not related to z/OS components).

Based on your explanation, and without seeing the logs, I believe this is related to the Zowe Explorer not being able to write the imperative.json file. image

Steps forward:

  1. Please make sure the ZFS (specially the .zowe directory) is mounted with read-write permissions
  2. Zowe Explorer should surface the error properly about not being able to write the .zowe/settings/imperative.json file.

I suggest you read thru the whole thing again to make sure you understand the problem! I am getting a bit angry, this took far to long and it looks to me i keep getting "keep the customer busy" questions! Maybe you should talk to project members a bit more experianced with z/OS and z/Unix.

At this point, I will unassign myself and communicate in the Zowe Explorer Standup (open-call in the zowe-calendar) that a more z/OS experienced member is desired.

Regards, Fernando.

zFernand0 avatar Mar 30 '23 12:03 zFernand0

Hi @zFernand0,

This is of course a client side issue. As i described at the very beginning of this issue, it did work for a long time with Zowe Explorer 1.x and it stopped working with the first install of Zowe Explorer 2. Nothing had changed on the z/OS side of the story. I am using VSCode on Windows! The .zowe directory is in my $HOME and of course it is read and writable by my userid! There is NO .zowe directory on the z/OS NFS share! The share (z/Unix file system) does contain git repos cloned with git in z/OS. By mounting the z/Unix folders with the Windows nfs Client, the VSCode built in git client works with git repos in z/Unix which is a big advantage. Zowe Explorer 2 seems to do unneccesary stuff when a VSCode Workspace mounted with the Windows nfs client is opened. As i said it looses all z/OSMF Profile definitions. This causes IBM Z Open Editor to stop working, so there is no syntax highlighting and other lsp related stuff anymore. This all worked beautifully with Zowe Explorer 1

Regards Ronny

cybersorcerer avatar Mar 31 '23 04:03 cybersorcerer

Hi @cybersorcerer ,

I've made some adjustments to how we build project/workspace directories for Windows systems. Seeing the context of this error message, I am hopeful that this fix will resolve your issue. I was wondering if you could verify this by trying a new .vsix file (VS Code extension) that contains the fix? I will attach it to this comment.

To install an extension from a VSIX file:

  1. Download the attached .zip file that contains the VSIX.
  2. Extract the VSIX from the .zip file to an accessible location.
  3. Within VS Code, click on the "Extensions" panel on the left-hand side
  4. Then, click on the "meatball" or "kebab" menu (three dots) at the top of the Extensions view: image
  5. Next, click "Install from VSIX..."
  6. When the file browser appears, navigate to the path where the VSIX is located. Select the VSIX file and click "Install"
  7. Once finished, VS Code will prompt you to reload the window to apply the extension changes.

Here is the link to the .zip containing the VSIX: Zowe Explorer VSIX (realpath fix).zip


If the error still occurs after installing the new VSIX, the extension logs will help provide more insight into this problem. In this case, please attach the extension logs to this thread and we will continue to diagnose this issue.

To access the extension logs:

  1. Open the Output panel in VS Code: either through the shortcut Ctrl+Shift+U, or by clicking "View" -> "Output" in the menu bar
  2. In the dropdown on the top-right of the Output panel, select the option "Zowe Explorer"
  3. In the Output for Zowe Explorer, you will see the following lines at the beginning:
Zowe Explorer 2.8.0-SNAPSHOT
This log file can be found at <FILE_PATH>
  1. Using the file explorer, navigate to the log file path specified in the logging messages (should be a path ending in zowe.log)
  2. Upload this zowe.log file as a comment on this issue thread.

Thanks again for your feedback and patience regarding this issue.

traeok avatar Apr 06 '23 18:04 traeok

Hi @traeok,

I am currently on vacation. I will be back in the office on tuesday. I will test an report the results.

Greetings Ronny

cybersorcerer avatar Apr 07 '23 19:04 cybersorcerer

Good Morning @traeok,

I just installed the version you provided and it definitely fixed the issue!

Greetings

Ronny

cybersorcerer avatar Apr 11 '23 04:04 cybersorcerer

Hi @cybersorcerer ,

Excellent, glad to hear! We merged in the fix today - it will be included with the next minor release of Zowe Explorer, v2.8.0. Feel free to reply to this thread if you have any more questions or concerns regarding this issue.

Closing as completed in #2224.

Thanks, Trae

traeok avatar Apr 11 '23 13:04 traeok