New to this, main drain and light help

Hello i would like to start by saying thanks for allowing me here. We are new to this in ground pool stuff but always have had pools. We bought this house it has indoor in ground pool. One light is not attached or sealed and i beleive theres a hairline crack in the main drain pvc that i can readily see. I need help identifying how this particular main drain is attached and to be able to find a replacement, also how i should go about pixing this pvc crack. :flushed: very knowledgable in plumbing and electrical and general repairs but not comfy yet with the unknown of a potentially catastrophic situation…lol i am going to try to upload the pics if i can figure this out. Thank you for all your words of wisdom. Also we are redoing the entire pool. Skimmer line is its own line main line is its own line and returns theres 2 are on one line. Used shop vac to see if there was pressure in each line and they all seem good but i can visually see this pvc and i do not want to finish and fill pool if there are issues.

A couple of questions for you about your pictures:

1. What is the rectangle box picture of?

2. What is the main drain material made out of?

3. What is the PVC pipe picture showing?

I may have answers for your issues but the answers to these questions will help me understand what your dealing with better.

Hello and thanks for replying. I put captiions on the pics but i see now they did not show up😟. The rectangle box is where a light is supposed to go but its missing.

Main drain is like a pvc material i think

The pvc pipe pic is what i believe to be a crack in the pvc itself

Thanks

Update we just now during demo have found another return line…under the shotty tile job that we have ripped out. Omg unbelievable, its still in use and they wonder why 10000$ tile job failed the return was putting water behind the tiles😳 tested the 3 return lines and they all appear to be solid. I cant beleive it . i thought there were bigger fish to fru looking for massive line breaks but i think this may have been the water problem.