MVS-sysgen / sysgen

Jay Moseley MVS 3.8j sysgen automation
71 stars 19 forks source link

fresh sysgen fails, if passwords in users.conf are modified. #35

Closed gmgauthier closed 1 year ago

gmgauthier commented 1 year ago
[+] [19:38:38] Step 9. Installing MVS/CE Package Manager MVP
[+] [19:38:38] Installing MVP
[+] [19:38:43] Install terminated at step step_09_mvp. Use '-C' to restart at this step.
[+] [19:38:43] Shutting down hercules
[+] [19:38:43] Hercules has exited
Traceback (most recent call last):
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2468, in <module>
    main()
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2459, in main
    mvsce.install(step, substep)
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 279, in install
    self.step_09_mvp()
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2068, in step_09_mvp
    self.check_maxcc("MVPINSTL")
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 1916, in check_maxcc
    raise ValueError("Job {} not found in printer output {}".format(jobname, printer_file))
ValueError: Job MVPINSTL not found in printer output prt00e.txt

And, in the mvslog, I can see this:

FF40 14.38.41           $HASP099 ALL AVAILABLE FUNCTIONS COMPLETE
0200 14.38.43 JOB   12  $HASP100 MVPINSTL ON READER1     MVP Install
FFFF 14.38.43 JOB   12  RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:IBMUSER
4020 14.38.43 JOB   12  IEF722I MVPINSTL - FAILED - INVALID PASSWORD GIVEN
4000 14.38.43 JOB   12  $HASP373 MVPINSTL STARTED - INIT  1 - CLASS A - SYS MVSC
4000 14.38.43 JOB   12  $HASP396 MVPINSTL TERMINATED

I will attach the logs, the mvp.ini, and the users.conf here. mvslog.txt prt00e.txt sysgen.log MVP_ini.txt

System:

Linux plato 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
gmgauthier@plato $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye
gmgauthier@plato $ zsh --version
zsh 5.8 (x86_64-debian-linux-gnu)
gmgauthier@plato $ python --version
Python 3.9.2
gmgauthier commented 1 year ago

@mainframed The build gets beyond Step 9 now. But is now failing for the same reason in Step 10:

[+] [20:17:29] Customization Complete
[+] [20:17:29] Step 8. Installing RAKF
[+] [20:17:29] Getting current RAKF release from github
[+] [20:17:33] Generating temp/RAKF/rakf_install.jcl
[+] [20:17:33] Adding RAKF user: GMGAUTH
[+] [20:17:33] Adding RAKF user: IBMUSER    <----(with modified password)
[+] [20:17:33] Adding RAKF user: MVSCE01
[+] [20:17:33] Adding RAKF user: MVSCE02
[+] [20:17:33] Installing RAKF Release
[+] [20:18:04] Resetting MVSCE with CLPA to complete install
[+] [20:19:12] Step 9. Installing MVS/CE Package Manager MVP
[+] [20:19:12] Installing MVP
[+] [20:19:16] MVP install user: GMGAUTH
[+] [20:20:22] Step 10. Installing Extra Components
[+] [20:20:22] Adding support for indirect cataloging using VOLUME(******) (Usermods ZP60041, ZP60042, ZP60043)
[+] [20:20:25] Install terminated at step step_10_extras. Use '-C' to restart at this step.
[+] [20:20:25] Shutting down hercules
[+] [20:20:25] Hercules has exited
Traceback (most recent call last):
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2489, in <module>
    main()
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2480, in main
    mvsce.install(step, substep)
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 283, in install
    self.step_10_extras()
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 2106, in step_10_extras
    self.check_maxcc("ZP60041")
  File "/DATA1/Projects/foss/sysgen/./sysgen.py", line 1916, in check_maxcc
    raise ValueError("Job {} not found in printer output {}".format(jobname, printer_file))
ValueError: Job ZP60041 not found in printer output prt00e.txt

From sysgen.log:

20:20:25,207 root DEBUG [HERCLOG] / $HASP395 ZTIMER   ENDED
20:20:25,207 root DEBUG [HERCLOG] / $HASP099 ALL AVAILABLE FUNCTIONS COMPLETE
20:20:25,207 root DEBUG [SUBMIT BINARY] Submitting usermods/ZP60041.jcl
20:20:25,208 root DEBUG [HERCLOG] HHC01040I 0:000C COMM: client localhost, IP 127.0.0.1 connected to device 127.0.0.1:3505
20:20:25,208 root DEBUG Waiting for string to appear in hercules log: $HASP099 ALL AVAILABLE FUNCTIONS COMPLETE
20:20:25,213 root DEBUG [HERCLOG] / $HASP100 ZP60041  ON READER1     ZP60041 + 42 + 43
20:20:25,320 root DEBUG [HERCLOG] HHC01206I 0:000C Card: client localhost, IP 127.0.0.1 disconnected from device 127.0.0.1:3505
20:20:25,356 root DEBUG [HERCLOG] / RAKF0004 INVALID ATTEMPT TO ACCESS SYSTEM:  USER:IBMUSER
20:20:25,371 root DEBUG [HERCLOG] / IEF722I ZP60041  - FAILED - INVALID PASSWORD GIVEN
20:20:25,371 root DEBUG [HERCLOG] / $HASP373 ZP60041  STARTED - INIT  1 - CLASS A - SYS MVSC
20:20:25,376 root DEBUG [HERCLOG] / $HASP396 ZP60041  TERMINATED

Maybe a better approach would be to just tell the user to leave the default existing ID's alone, until AFTER the sysgen, and then use the standard rakf process for editing users as needed via ISPF?

gmgauthier commented 1 year ago

Actually, having a look at your code change, maybe just extract that into a callable function, and then you can easily call it from any step that needs a rakf user?

mainframed commented 1 year ago

Thats exactly what I'm thinking.

Debating on three techniques how to handle JCL post RAKF install:

1) Wholesale replace the jobcard in python - but this makes finding why some jcl fails harder cause now there's a disconnect between whats on disc vs whats submitted

2) Use the code from MVP to change the user/password in the jobcard

3) Remove the jobcard from any post RAKF JCL and have python generate it.

I'm personally leaning toward 3 just for ease of implementation.

gmgauthier commented 1 year ago

Thats exactly what I'm thinking.

Debating on three techniques how to handle JCL post RAKF install:

  1. Wholesale replace the jobcard in python - but this makes finding why some jcl fails harder cause now there's a disconnect between whats on disc vs whats submitted
  2. Use the code from MVP to change the user/password in the jobcard
  3. Remove the jobcard from any post RAKF JCL and have python generate it.

I'm personally leaning toward 3 just for ease of implementation.

2 seems least intrusive. But 3 seems like it will give you better control over the whole process. I think I agree with where you're leaning...

mainframed commented 1 year ago

Ok, this is complete with the newest commit, can you test to confirm?

gmgauthier commented 1 year ago

Ok, this is complete with the newest commit, can you test to confirm?

Thanks! I'll give it a shot tonight after work...

gmgauthier commented 1 year ago

Ok, this is complete with the newest commit, can you test to confirm?

Yep, it worked!

The first attempt failed in the cleanup on Step 12. But after re-starting (-C) it recovered fine.