List all images - pages not found
-
[quote=“imcdona, post: 31915, member: 24875”]I’ve run into the same issue and believe I can reproduce the error. In order to test my theory I’ll first need to know how to delete the FOG db and re-run setup. How did you delete the DB so I can re-run setup?
After I’ve fixed my install I’ll see if I can break it again and report back on how I did it.[/quote]
[code]
mysql -u root -p’<IFYOUSETPASSWORDENTERHERE>’
drop database fog;
exit[/code] -
Hello,
I’m also having this problem and it would be great to find a way out of this trap without having to drop the database and/or re-install FOG.I’m not sure if anyone can help, but here is what I did:
Installed main FOG server - DefaultMember is storage node 1
Installed an additional physical server to serve as storage node 2
Uploaded test image - everything was still working fine
Created new storage group (storage group 2) so test image could be multi-casted directly from storage node 2, on-site.
Associated 2nd physical storage node with new storage group
Went in to test image definition and associated test image with storage group 2Now, “List All Images” returns an HTTP 500 error. I cannot search for the image that I re-associated, FOG thinks that it no longer exists I guess…?
I can search for and use images that I did not touch, but I guess simply re-associating an existing image with a new storage group screws things up? This seems weird, but that is what seemed to happen to me…
Maybe I created/associated the node, group, or image in the wrong order or something…?
Thanks for any help and/or advice, this is kind of frustrating,
D.L.FOG Version 1.1.2
XUbuntu 14.04 -
This is fixed and SVN
-
Thanks Tom,
I STILL haven’t used SVN, is it the one found here ? :[url]http://mastacontrola.com/downloads.html[/url]
Also, I deleted Storage Group 2 in an attempt to get “List all images” working again. That was probably a bad idea as I believe that new storage groups will be numbered 3, 4, 5, etc.? Does this mean that the system will become confused because that image definition (which I can no longer access) is now associated with Storage Group 2, which no longer exists and cannot be re-created?
Thanks a bunch,
D.L. -
You can use the one from the link you provided but there is a wiki for it as well yes he will be able to fix that though you’re right the numbering might be off by one
-
It worked!
Thanks Tom, you’re the man!
The numbering thing has always confused me, however. If you delete an image (and now a storage group) it creates a gap in the numbering sequence and that cannot be corrected. I’m sure that this is off topic, but would it be possible to have the image ID and storage group ID as a pull-down menu, radio button, or just a field with a number in it?? That way you could reset the order correctly if you had to delete anything…??
Thanks again!
D.L. -
I think you’re being OCD over it, not that it’s necessarily a bad thing, but the Group ID isn’t the essential factor, or any ID for that matter.
We don’t set the id, we let mysql handle that so as to ensure there won’t be conflicts. What the ID is doesn’t matter so long as it’s valid. An ID of 0 is not valid in this case. Imagine what would happen if we let user decide the ID’s of hosts or groups or printers or anything for that matter?
-
Yeah, I see your point. And yes, although I know that it’s not critical, I am slightly OCD with numbering because our team has to know what IDs to use with the correct rooms/machines. With image IDs for example, it is convenient to have sequential numbering that is as low as possible so we’re not using random image ID values like 12, 25, 37, 43, etc. because that is more difficult to remember and to keep track of on a chart, etc.
To help alleviate this problem, I NEVER delete an image definition on a production FOG server - I simply overwrite it with a new image, as needed - this keeps the numbering contiguous, without gaps…
As you can guess, FOG has helped me [B]immensely[/B] but when I encounter a small issue I do enjoy discussing its structure and possible changes as a user, albeit in the wrong thread.
Thank you once again for all of your work and help,
Best regards,
D.L. -
I imagine you’d likely have to do your own manual editing to get all the ID’s back in place.
In the case of the Storage Group ID, I imagine you don’t have too many groups that this is going to be a very long task?
You can change the ID’s of the groups with:
[code]UPDATE nfsGroups AS x,(SELECT min(t1.ngID+1) AS gap_starts_at FROM nfsGroups t1 WHERE NOT EXISTS (SELECT t2.ngID FROM nfsGroups t2 WHERE t2.ngID = t1.ngID +1)) AS y SET x.ngID=y.gap_starts_at WHERE x.ngID <> 1 AND y.gap_starts_at - 1 <> x.ngID;
ALTER TABLE nfsGroups AUTO_INCREMENT=1;[/code] -
Yeah, years ago I did use SQL Workbench or something similar to edit ID’s manually. As you suggest, however, it’s not that big of a deal with the Storage Groups (set it and forget it), and I don’t ever delete images (I just overwrite them) so the image ID’s are fine.
Regarding your code, where do you run it? Inside the command line SQL interface or in a batch/BASH script, or somewhere else?
Thanks for your help Tom,
D.L. -
You run it in the mysql command prompt.
So before you run that, you run:
[code]mysql -u root [ -p’PASSWORDHERE’ #ONLYIFYOUSETPASSWORD ] fog[/code] -
Yeah, I figured that you had to enter into MySQL command prompt, thank you!
-
What was the actual root cause of this problem? I’ve just run into it after upgrading a 0.32 system to 1.1.2. The system is in production so I’d rather not upgrade to SVN unless it is absolutely necessary.
[COLOR=#ff0000]EDIT - FIXED (kindof)[/COLOR]
[COLOR=#000000]In my case this turned out to be one of my “antique” images which was referring to an imageNFSGroupID which no longer exists. Correcting that problem fixed the white screen issue for me. [/COLOR][COLOR=#000000]N.B. I’m including the SQL (below) which fixed my problem, but I’m doing this mostly as a reminder to myself. Use it at your own risk!!![/COLOR]
[CODE]
$ mysql -u root -p
Enter password: *************
mysql> use fog;
mysql> SELECT ngID,ngName FROm nfsGroups;
±-----±--------+
| ngID | ngName |
±-----±--------+
| 1 | default |
±-----±--------+mysql> SELECT ngmID,ngmGroupID FROM nfsGroupMembers;
±------±-----------+
| ngmID | ngmGroupID |
±------±-----------+
| 1 | 1 |
±------±-----------+mysql> SELECT imageID, imageName, imageNFSGroupID FROM images WHERE imageNFSGroupID!=1;
±--------±-----------------------------------------±----------------+
| 47 | RHL6x64PIMS50GBTest | 3|
±--------±-----------------------------------------±----------------+mysql> UPDATE images SET imageNFSGroupID=1 WHERE imageID=47;
[/CODE]