Can two podman containers have same prefix for respective container ID? - containers

Can two podman containers have same prefix for respective container ID?
I never faced such a situation.
If they have the same prefix - suppose the first 4 characters of the container IDs match, for example a35d and we try to remove them simultaneously using a single command, i.e.,
podman container rm a35d a35d, would we receive an error?

Related

Mysql make column in table user specific

I would like to give a little background. I use Kodi which is set up to use my MySQL Server for storing all it needs to remember.
There is one table that stores the physical file location together with a flag whether that file was watched before or not.
I now want to share my DB with my family but I don't want them to have the same "seen" flags as I have. They should be able to store their own values.
I don't want to set up a separate MySQL Server for each of them and I would like to avoid making changes to the Kodi Code.
So is there a way I can make this column like a link that changes depending on the user that has logged in? So that the MySQL Query for Kodi keeps the same but the answer from the Server differs, depending on the user account?
Or are there any other ways you would accomplish this?
Thanks in advance :)

Organizing a database using folders in phpMyAdmin

Right now I have a database in phpMyAdmin, and off the the side of the screen, it shows the database name, and a list of tables inside the database. It's fine if it's only a couple of tables, but when there's dozens of tables, it gets hard to find the tables I want to edit. I've thought about creating another database to make it easier to organize, but then I'll have to connect using the different database's name and a different user login for the database, and I just thought how much easier would it be if I can make folders or something similar inside the database I already have to organize my tables. I'm wondering if something like this is possible, or anyone know any work-around this issue.
Well, you can't create a database (or folders) within a database; that's just not something MySQL is able to do.
phpMyAdmin has a grouping feature that may help your situation. By default, databases with a prefix followed by _ (a single underscore) will be grouped together, as will tables with __ (two underscores).
Here's an example of how this ends up looking when grouped:
Database:
Table:
If you're able to rename some of your tables, you'll be able to take advantage of the grouping feature to make the phpMyAdmin display a bit more manageable. Of course, this won't change the way other tools display the table list.
The configuration directives $cfg['NavigationTreeDbSeparator'] and $cfg['NavigationTreeTableSeparator'] control the separator used. The relevant documentation starts at http://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeEnableGrouping and includes the next few line items.

need database model for online game

I need a database model for an online game:
The game should save the characters which have more or less this type of character file:
http://pastebin.com/tsWdaxte
Every player has:
-a username, password and a bunch of ints/strings
-a container "inventory" which holds "items(id & amount)" in a certain slot
-a container "bank" which also holds items
-a container "equipment" which also holds items
-a friendslist which holds longs (64 bit integers which can be converted to usernames)
-skills which are specified with an "id"(int) and "experience"(int)
My current idea was to use the following tables:
-players
-inventory
-bank
-equipment
-friends
-skills
all containers would look something like
id | amount | slot | owner_id
every player should have its own "id" which would be auto-incremented
but I'm not exactly sure how the primary keys & foreign keys system works in MySQL and I'd prefer to have some professional help instead of trying to figure out things on my own
You definitely could use the layout you suggested with the tables players, inventory, bank (although I'd put inventory and bank into one and have a boolean "isbanked" or w/e), equipment, friends, and skills. Although I think you could also throw all of them except skills into the players table and just split the string using String.split(","); in java. Look up auto increment primary keys when creating a table; it does it all for you pretty much.

How to override mysql parameters if some conditions are met?

Imagine that I have two couriers and some packages:
|name|proficient
|Jon |cats
|Mike|bugs
|item|container
|cats|cage
|bugs|jar
The trick is, if courier is proficient with bugs, then he will carry them in a jar. If not, he will carry them in a box.
Should this be made in the client side or I should make another container? or should I make two types of container for the same item and choose right one with the trigger?

How to do logical partitioning in SGE?

I am using GE2011.11. Previously, I was using Torque/Maui. In Maui, there is a concept of partition with the help of which we can logically divide the cluster. A node can't belong to more than one partition.
In GE, I am thinking of host groups to achieve this but a node(host) can belong to more than one host group this is what is undesirable. Any idea, how can we achieve partitioning with host groups?
In GE, there is a feature called multi-clustering. Can we use this feature to implement partitioning? Any idea, how do we use this?
With SGE you can modify the host groups manually so that a host(node) only exists in a single host group. You can then create queues that only use a single host group. The users would then submit jobs to the specific queues(which themselves can be limited by users) to access specific host groups. This would effectively divide your grid.
The basic things to look out for when performing this setup relates to the all.q queue and the #allhosts hosts group. If you remove all hosts from the #allhosts group you should be okay to do this.
Let me know if you have further questions, I would be happy to help as I have been administering an SGE cluster for years now.
Since the administrator defines the membership of hostgroups just define the groups so as not to overlap. If you want to control which users can run on which partition you can do this by defining grid engine acls/usersets for each group of users and using the enhanced queue configuration syntax to associate a different list with each hostgroup in the queue definitions.
user_lists chemists,[#physicshosts=physicists],[#biologyhosts=biologists]
If what you are trying to do is ensure a given job runs on one set of hosts or the other but not a mixture then you need to define multiple identical parallel environments and use a similar trick to associate each PE with a different hostgroup.
pe_list mpich-A,[#switchb=mpich-B],[#switchc=mpich-C]
Users then request a wildcard PE when submitting their job:
#$ -pe mpich-* 8